Apache AB stress test error (Apr_socket_recv:connection reset by Peer (104))
Today, using Apache's own AB tool test, when the concurrency reached more than 1000 times the error is as follows: [[email protected]~]# This is apachebench, Version 2.3 < $Revision: 655654 $ >copyright 1996 Adam Twiss, Zeus technology LTD, http://www.zeustech.net/Licensed to the Apache software Foundation, HT Tp://www.apache.org/benchmarking 192.168.1.176 (Be patient) completed requestscompleted 900 Requests
apr_socket_recv:connection Reset by Peer (104)Total of 1085 requests completed view Application server and database are not error, the connection was reset, Bingyi the following, Apr_socket_recv this is an operating system kernel parameters, in high concurrency situation, The kernel will assume that the system is under a SYN flood attack and will send a cookie (possible SYN flooding on port 80. Sending cookies), which slows down the speed of the request, so setting this parameter to 0 on the app service weapon disables system protection for large concurrency tests: # vim/etc/sysctl.conf net.ipv4.tcp_syncookies = 0# Sysctl-p then you can have more than 1000 concurrent tests. Additional system kernel parameter descriptions are also attached:net.ipv4.tcp_syncookies = 0#此参数是为了防止洪水攻击的, but for large concurrent systems, to disable this settingNet.ipv4.tcp_max_syn_backlog#参数决定了SYN_RECV状态队列的数量, the general default value is 512 or 1024, that is, the system will no longer accept new TCP connection requests, to a certain extent, to prevent system resource exhaustion. This value can be increased to accept more connection requests, depending on the situation.net.ipv4.tcp_tw_recycle#参数决定是否加速TIME_WAIT的sockets的回收, the default is 0.Net.ipv4.tcp_tw_reuse#参数决定是否可将TIME_WAIT状态的sockets用于新的TCP连接, the default is 0.net.ipv4.tcp_max_tw_buckets#参数决定TIME_WAIT状态的sockets总数量, it can be set based on the number of connections and system resource needs. Reference: http://zhumeng8337797.blog.163.com/blog/static/100768914201262091634698/
Apache AB pressure test error (apr_socket_recv:connection reset by Peer (104))