Recently, a company customer reported a problem with an error message in the Apache log /var/log/ HTTPD /error_log file after running for a while
[Fri Jul 29 15:45:37 2016] [error] server reached MaxClients setting, consider raising the MaxClients setting
I checked that this was due to the number of concurrent links. Later, I checked the Apache documentation and found that I could modify the Apache configuration file
The/etc/HTTPD/conf/HTTPD. Conf the MaxClients parameter to adjust.
In adjusting the first thing to check before running apache is a kind of mode is prefork or worker, use “/ usr/sbin/HTTPD -l” command to check, after checking out what kind of pattern, you can find the/etc/HTTPD/conf/HTTPD. Corresponding to the configuration of the part to modify the conf.
# httpd -l
Compiled in modules:
core.c
prefork.c
http_core.c
mod_so.c
Change the parameters and put them in
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>
Modified to
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 1024
MaxClients 1024
MaxRequestsPerChild 50
</IfModule>
Then restart Apache “Service HTTPD Restart”.
The meaning of parameters is explained in detail in the Apache configuration, as follows:
# 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
# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
div>
Read More:
- org.apache.ibatis.type.TypeException: Error setting non null for parameter #4 with JdbcType null
- Idea for Mac setting JVM running parameters to solve running stuck problem
- Idle line number setting and linenumbers modification
- Setting up a virtual environment for jupyter notebook
- Pychar font zoom setting
- PHP CI (CodeIgniter) log level setting
- Vscode setting console. Log () shortcut method
- VirtualBox + CentOS 7 virtual machine setting static IP address of host only NIC
- Eclipse automatic prompt setting method and optimization
- VIM setting file encoding format
- How to Fix LDPlayer4 Proxy Setting Not Work Issue
- Points for attention in setting up robot framework + Python 3.7.0 environment
- Chrome setting — Disable web security to solve cross domain problems
- Setting the exclutable path of QT running settings
- Must have equal len keys and value when setting with an Iterable
- Setting the root password of windows 10 Ubuntu subsystem
- CentOS 8.2 installation-solve Error setting up base repository
- Abnormal reading after stm32f4 RTC time setting
- R language – path setting and working directory modification
- Git prompt error setting certificate verify locations