apr_socket_recv: Connection reset by peer (104)

How did “people you might know” find you on social software>>>

Error in Apache AB stress test (APR)_ socket_ recv: Connection reset by peer (104))
[ root@aa ~]# This is ApacheBench, Version 2.3 <>
Copyright 1996 Adam Twi, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.176 (be patient)
Completed 300 requests
Completed 600 requests
Completed 900 requests
apr_ socket_ recv: Connection reset by peer (104)
Total of 1085 requests completed

Check the application server and database, no error is reported, the connection is reset, Bingyi is below, Apr_ socket_ Recv is a parameter of the operating system kernel. In the case of high concurrency, the kernel will think that the system has been affected by SYN Flood and will send cookies (possible SYN flooding on port 80. Sending cookies), which will slow down the speed of requests, Therefore, if the parameter is set to 0 and system protection is disabled, large concurrency test can be carried out:
VIM/etc/sysctl. Conf
net.ipv4.tcp_ Syncookies = 0
sysctl – P
then you can have more than 1000 concurrent tests

Other system kernel parameters are also attached

net.ipv4.tcp_ Syncookies = 0
# this parameter is used to prevent flooding, but for large concurrent systems, this setting should be disabled
to prevent flooding

net.ipv4.tcp_ max_ syn_ Back log
?Parameters determine syn_ Generally, the number of recv status queues is 512 or 1024 by default, which means that the system will not accept new TCP connection requests beyond this number, which can prevent the system from running out of resources to a certain extent. This value can be increased to accept more connection requests as appropriate

net.ipv4.tcp_ tw_ Recycle
?Parameter determines whether to accelerate time_ The default value is 0

net.ipv4.tcp_ tw_ Reuse
?Parameter determines whether time can be changed_ The sockets in wait state are used for new TCP connection, and the default value is 0

net.ipv4.tcp_ max_ tw_ Buckets
?Parameters determine time_ The total number of sockets in wait state can be set according to the number of connections and the needs of system resources

Reference:
1 http://zhumeng8337797.blog.163.com/blog/static/100768914201262091634698/

Similar Posts: