Apache AB Test Apr_socket_connect (): Because the target machine actively refused to connect

Source: Internet
Author: User

In this case, you usually run too many parallel ...

For example: Ab-c 1000-n 10000 http://localhost/index.html Such a large request will be hung up, but there is still remedial measures, can be added by adding the number of concurrency limit to solve the problem, the process such as the following:


1, stop Apache services;

2. Locate the apache/conf/httpd.conf file and open it with a text editor to find these two lines:
# Server-pool Management (MPM specific)
# Include Conf/extra/httpd-mpm.conf
Take the second line include ... The gaze of this line is removed.

3. Locate apache/conf/extra/httpd-mpm.conf file and open it. Find:

<ifmodule mpm_ Winnt_module>
Threadsperchild
Maxrequestsperchild 0
</IfModule>

Make the top 150 bigger. The maximum is 1920 under Windows.

Note: The name in the angle brackets is Winnt, don't look wrong.

4. Start Apache service again.

Apache AB Test Apr_socket_connect (): Because the target machine actively refused to connect

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.