How to modify the maximum number of Apache connections and the number of apache concurrencies

Source: Internet
Author: User

The maximum number of connections of Apache. The default value is 256.

Modify the maximum number of connections of apache as follows:

Step 1

First modify the/path/apache/conf/httpd. conf file.

The code is as follows: Copy code
# Vi httpd. conf
Remove "#" before "# Include conf/extra/httpd-mpm.conf" and save it.

Step 2

The code is as follows: Copy code
Modify the/path/apache/conf/extra/httpd-mpm.conf file.
# Vi httpd-mpm.conf

Find this line

Find the/etc/httpd/conf/httpd. conf file, modify the following parameters, and change the default 256 to 1000.

The code is as follows: Copy code

KeepAliveTimeout 15

##
# Server-Pool Size Regulation (MPM specific)
##

# Prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves

StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 1000
MaxClients 1000
MaxRequestsPerChild 4000

ServerLimit this command must be placed in the first line.

After modification, you must stop apachectl restart first and then start apachectl.

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.