Apache in the process of running, the error log appears as follows
[ERROR] Server reached maxclients setting, consider raising the maxclients setting
Check the Apache version
[[email protected] logs]# httpd-vserver version:apache/2.2.31 (Unix) Server Built:may 26 2016 01:33:18
To view the Apache working model, you can see the PREFORK.C
[[Email protected] logs]# apachectl -lcompiled in modules: core.c mod_authn_file.c mod_authn_dbm.c mod_authn_anon.c mod_authn_dbd.c mod_authn_default.c mod_authz_host.c mod_authz_groupfile.c mod_ authz_user.c mod_authz_dbm.c mod_authz_owner.c mod_authz_default.c mod_auth_basic.c mod_auth_digest.c mod_dbd.c mod_dumpio.c Mod_reqtimeout.c mod_ext_filter.c mod_include.c mod_filter.c mod_ Substitute.c mod_deflate.c mod_log_config.c mod_logio.c mod_env.c mod_expires.c mod_headers.c mod_ident.c mod_setenvif.c mod_version.c prefork.c http_core.c mod_mime.c mod_dav.c mod_status.c &nbsP;mod_autoindex.c mod_asis.c mod_info.c mod_cgi.c mod_dav_fs.c mod_vhost_alias.c mod_negotiation.c mod_dir.c mod_imagemap.c mod_actions.c mod_speling.c mod_userdir.c mod_alias.c Mod_rewrite.c mod_so.c
Apache maxclient settings are conf/extra/httpd-mpm.conf in the Apache working directory
The default settings for the Prefork model are as follows, with the maximum number of connections being only 150, far from meeting production requirements
<ifmodule mpm_prefork_module> startservers 5 minspareservers 5 maxspareservers Ten Ma Xclients Maxrequestsperchild 0</ifmodule>
Startservers: Number of initial boot processes
Minspareservers: Minimum number of idle processes
Maxspareservers: Maximum number of idle processes
MaxClients: Maximum number of client connections
Maxrequestsperchild: The number of requests per child process that can be processed, 0 for unlimited
The changes are as follows:
<ifmodule mpm_prefork_module> startservers minspareservers maxspareservers 15 Serverlimit maxclients Maxrequestsperchild 10000</ifmodule>
In the case of a worker model, the initial setting is:
<ifmodule mpm_worker_module> startservers 2 maxclients minsparethreads Max Sparethreads Threadsperchild Maxrequestsperchild 0</ifmodule>
Can be modified as follows:
<ifmodule mpm_worker_module> threadlimit serverlimit startservers 3 Maxclien TS-Minsparethreads-maxsparethreads-Threadsperchild-Maxrequestsperchild 0</ifmodule>
MaxClients must be an integral multiple of threadsperchild, threadsperchild*serverlimit must be greater than maxclients
Restart Apache Service after modification is complete
This article is from the "Sunny" blog, make sure to keep this source http://francis198.blog.51cto.com/720670/1852562
Apache reports maxclients setting error handling during Operation