Apache AB pressure test error (apr_socket_recv:connection reset by Peer (104))

Source: Internet
Author: User
Tags app service connection reset

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))

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.