Tuning Apache and Tomcat
Altering Apache and Tomcat Parameters
Apache and Tomcat Parameters 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 will not be able to provide support for catastrophic failure when these advanced parameters are modified without consultation. Tuning values for Apache httpd and Tomcat requires that you align these parameters with your server hardware. Furthermore testing of these altered values should be performed within a test environment.
MaxClients setting determines the number of Apache httpd processes, and thus limits the number of client connections that can be made at the same time (SUSE Manager uses the pre-fork MultiProcessing Modules).
The default value for
MaxClients in SUSE Manager is 150.
If you need to set the
MaxClients value greater than 150, Apache httpd’s ServerLimit setting and Tomcat’s
maxThreads must also be increased accordingly (see below).
The Apache httpd
MaxClients value is reached while the software is running, new client connections will be queued and forced to wait, this may result in timeouts.
You can check the Apache httpd’s
error.log for details:
[error] Server reached MaxClients setting, consider increasing the MaxClients setting
MaxClients parameter can be overridden on SUSE Manager by editing the
server-tuning.conf file located at
# 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>
Whenever the Apache httpd
maxThreads represents the maximum number of request processing threads that it will create.
This value determines the maximum number of simultaneous requests that it is able to handle.
All HTTP requests to the SUSE Manager server (from clients, browsers, XMLRPC API scripts, etc.) are handled by Apache httpd, and some of them are routed to Tomcat for further processing.
It is thus important that Tomcat is able to serve the same amount of simultaneous requests that Apache httpd is able to serve in the worst case.
The default value for SUSE Manager is 200 and should always be equal or greater than Apache httpd’s
maxThreads value is located within the
server.xml file located at
Example relevant lines in
<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"/>
When configuring Apache httpd’s
((3 * java_max) + apache_max + 60)