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.