Apache AB test apr_socket_connect (): Unable to connect because the target machine actively rejects

Source: Internet
Author: User

In this case, you usually run too many parallel jobs... For example, a request such as AB-c 1000-n 10000 http: // localhost/index.html fails, but there are still remedial measures, you can solve this problem by increasing the maximum number of concurrent jobs. The steps are as follows:


1. Stop the Apache service;

2. Find the apache/conf/httpd. conf file and open it in a text editor to find the two lines:
# Server-pool management (MPM specific)
# Include conf/extra/httpd-mpm.conf
Remove the comments of the second line include.

3, find the apache/conf/extra/httpd-mpm.conf file, open, find:

<IfModule mpm _ Winnt_ Module>
ThreadsPerChild 150
MaxRequestsPerChild 0
</IfModule>

Increase the value of 150 to 1920 in Windows.

Note: The name in the angle brackets isWinnt

4. Restart the Apache service.

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.