|
| |||
|
|
Почему сервер не отвечает ACK на запросы к HTTP серверу при больших нагрузках. Есть сервер как фронт, он проксирует трафик при помощи nginx на бекенды, канал загружен примерно на 150 мегабит при гигабитном канале. Не могу понять что случилось, но сервер перестал принимать входящие запросы именно на на 80 порт, если nginx поставить на два 80 и 81 порт, 81 запросы нормально проходят без задержек, а на 80 не проходят...вернее проходят, но как то через раз а то и через 10 раз. Что я вижу в tcpdump при запросе на 80 и 81 порты 12:05:50.681946 IP y.y.y.y.50486 > x.x.x.x.80: Flags [S], seq 1836049420, win 14600, options [mss 1460,nop,nop,TS val 730771892 ecr 0], length 0 0x0000: 90e6 baca 2b9f 00d0 015e 2c00 0800 4500 ....+....^,...E. 0x0010: 0038 55b8 4000 3906 8d3f 4e2e 3104 d917 .8U.@.9..?N.1... 0x0020: 067f c536 0050 6d6f e40c 0000 0000 9002 ...6.Pmo........ 0x0030: 3908 d2f8 0000 0204 05b4 0101 080a 2b8e 9.............+. 0x0040: b1b4 0000 0000 ...... и все завис, а на 81 порт проходит нормально все 12:05:39.158898 IP y.y.y.y.36886 > x.x.x.x.81: Flags [S], seq 1570498657, win 14600, options [mss 1460,nop,nop,TS val 730769011 ecr 0], length 0 0x0000: 90e6 baca 2b9f 00d0 015e 2c00 0800 4500 ....+....^,...E. 0x0010: 0038 4e12 4000 3906 94e5 4e2e 3104 d917 .8N.@.9...N.1... 0x0020: 067f 9016 0051 5d9b e861 0000 0000 9002 .....Q]..a...... 0x0030: 3908 1ed8 0000 0204 05b4 0101 080a 2b8e 9.............+. 0x0040: a673 0000 0000 .s.... 12:05:39.158906 IP x.x.x.x.81 > y.y.y.y.36886: Flags [S.], seq 3794583370, ack 1570498658, win 5792, options [mss 1460,nop,nop,TS val 4294964954 ecr 730769011], length 0 0x0000: 00d0 015e 2c00 90e6 baca 2b9f 0800 4500 ...^,.....+...E. 0x0010: 0038 0000 4000 4006 dbf7 d917 067f 4e2e .8..@.@.......N. 0x0020: 3104 0051 9016 e22c bf4a 5d9b e862 9012 1..Q...,.J]..b.. 0x0030: 16a0 a8dc 0000 0204 05b4 0101 080a ffff ................ 0x0040: f6da 2b8e a673 ..+..s sysctl весь по-умолчанию debian , кроме этого fs.file-max = 80000 net.core.netdev_max_backlog = 30000 #net.core.somaxconn = 562144 net.core.somaxconn = 1024 net.ipv4.conf.all.accept_redirects=0 net.ipv4.conf.all.accept_source_route=0 net.ipv4.conf.all.forwarding=1 net.ipv4.conf.all.log_martians=1 net.ipv4.conf.all.rp_filter=1 net.ipv4.conf.all.send_redirects=0 net.ipv4.icmp_echo_ignore_broadcasts=1 net.ipv4.icmp_ignore_bogus_error_respons net.ipv4.ip_forward = 1 net.ipv4.ipfrag_low_thresh = 262144 net.ipv4.ipfrag_time = 30 net.ipv4.tcp_abort_on_overflow = 0 net.ipv4.tcp_ecn = 1 net.ipv4.tcp_fin_timeout=60 net.ipv4.tcp_keepalive_intvl=30 net.ipv4.tcp_keepalive_probes=3 net.ipv4.tcp_keepalive_time=7200 net.ipv4.tcp_max_orphans = 262144 net.ipv4.tcp_max_syn_backlog = 1024 net.ipv4.tcp_max_tw_buckets = 7200000 net.ipv4.tcp_mem = 19232 200229760 850344640 net.ipv4.tcp_orphan_retries = 6 #net.ipv4.tcp_rmem = 4096 87380 4194304 net.ipv4.tcp_sack = 1 net.ipv4.tcp_synack_retries = 5 net.ipv4.tcp_syncookies=0 net.ipv4.tcp_syn_retries=3 net.ipv4.tcp_tw_recycle = 0 net.ipv4.tcp_tw_reuse = 1 net.ipv4.tcp_window_scaling=1 net.ipv4.tcp_wmem = 4096 16384 131070 net.netfilter.nf_conntrack_max=100485760 net.core.wmem_default = 4194394 net.core.rmem_default = 8388608 net.core.wmem_max = 33554432 net.core.rmem_max = 33554432 в netstat много ошибок очень Tcp: 24330 active connections openings 130217 passive connection openings 11662 failed connection attempts 1617 connection resets received 6182 connections established 12975448 segments received 983226 segments send out 27921 segments retransmited 82 bad segments received. 43139 resets sent UdpLite: TcpExt: 11659 resets received for embryonic SYN_RECV sockets 27517 TCP sockets finished time wait in fast timer 185 packets rejects in established connections because of timestamp 599 delayed acks sent 1 delayed acks further delayed because of locked socket Quick ack mode was activated 3010 times 1 packets directly queued to recvmsg prequeue. 154183 packet headers predicted 488360 acknowledgments not containing data payload received 9755 predicted acknowledgments 8 times recovered from packet loss by selective acknowledgements 1 bad SACK blocks received 5 congestion windows recovered without slow start by DSACK 4264 congestion windows recovered without slow start after partial ack 8 TCP data loss events TCPLostRetransmit: 1 1 timeouts after reno fast retransmit 133 timeouts after SACK recovery 3 timeouts in loss state 23 fast retransmits 2 forward retransmits 35 retransmits in slow start 13829 other TCP timeouts 2 SACK retransmits failed 2722 DSACKs sent for old packets 1 DSACKs sent for out of order packets 7884 DSACKs received 31 connections reset due to unexpected data 2148 connections aborted due to timeout TCPDSACKIgnoredOld: 2991 TCPDSACKIgnoredNoUndo: 2735 TCPSpuriousRTOs: 6 TCPSackShiftFallback: 265 dmesg не чего полезного нет |
||||||||||||||