Note: These values should only be modified with support or consulting as these parameters can have severe and catastrophic performance impacts on your server when improperly adjusted. SUSE Linux will not be able to provide support for catastrophic failure when these advanced parameters are modified without consultation. The apache maxClients parameter must not be greater than tomcat maxThreads parameter.
Apache MaxClients Parameter
The MaxClients setting determines the number of Apache processes, and thus the number of client connections that can be made (requirement: the pre-fork MultiProcessing Modules). The default Apache setting for MaxClients in SUSE Manager is 150. If you need to set the MaxClients value greater than 150, the ServerLimit setting must also be increased. If the MaxClients value is reached while the software is running, clients outside the MaxClients parameter value will be forced to wait and may time out. You can check the Apache error.log for details.
[error] Server reached MaxClients setting, consider increasing the MaxClients setting
The default MaxClients settings can be overridden in SUSE Manager by editing the server-tuning.conf file located at:
Example server-tuning.conf file:
# prefork MPM <IfModule prefork.c> # number of server processes to start # http://httpd.apache.org/docs/2.2/mod/mpm_common.html#startservers StartServers 5 # minimum number of server processes which are kept spare # http://httpd.apache.org/docs/2.2/mod/prefork.html#minspareservers MinSpareServers 5 # maximum number of server processes which are kept spare # http://httpd.apache.org/docs/2.2/mod/prefork.html#maxspareservers MaxSpareServers 10 # highest possible MaxClients setting for the lifetime of the Apache process. # http://httpd.apache.org/docs/2.2/mod/mpm_common.html#serverlimit ServerLimit 150 # maximum number of server processes allowed to start # http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxclients MaxClients 150 # maximum number of requests a server process serves # http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxrequestsperchild MaxRequestsPerChild 10000 </IfModule>
Tomcat maxThreads Parameter
Tomcat maxThreads represents the maximum number of request processing threads to be created by the HTTPConnector. This value determines the maximum number of simultaneous requests that may be handled. The default value for SUSE Manager is 200 and should always be equal or greater than the Apache MaxClients value if modified. The maxThreads value is located within the server.xml file located at:
Example server.xml file:
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8" address="127.0.0.1" maxThreads="200" connectionTimeout="20000"/> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8" address="::1" maxThreads="200" connectionTimeout="20000"/>
SUSE Manager Tuning Notes
When configuring apache MaxClients and Tomcat maxThreads it is not enough to keep apache Maxclients equal or lower than Tomcat maxThreads. You will need also need to ensure enough database connections are available. Please see the following equation for a rough calculation.
((3*$javamax) + $apachemax + 60)