[Lugstuff] Apache Server Max Clients

Theodore Knab tjk at annapolislinux.org
Fri Nov 7 11:15:39 EST 2008


Hi, 

I was wondering if anyone was good with Apache tuning.

More specifically, I am very rusty with Apache performance related
issues. But, I am seeing this in the logs this error in the logs:

[Mon Nov 03 17:11:38 2008] [error] server reached MaxClients setting,
consider raising the MaxClients setting

When I look at the apache error logs, it does not look like a 
Denial of Service is occurring. The requests are coming it a steady rate
and look like regular requests. Additionally, the system is not under
any load.

For example, the system is only 11-15% utilization when Apache starts complaining.
Memory use is normal. No swap space is use.

I bumped up the max clients number from 156 to 256, but that is 
as far up as I could go. Later when I continued to see this I switched, to 
the Worker threaded port http.worker.

System: RHEL v3
Apache: Apache 2 Pre-fork
Code:   Mostly Perl scripts
Netstat: is only counting 10-20 active connections 
	most of the time. However, I am seeing a lot
	[300-400] "TimeWait" connections from web clients.

Apache Relevant Config Parameters: 

Timeout  300
Keepalive Off
Timewait 15
MaxKeepAliveRequests 1500 #was 256 when I last got the error
MaxKeepAliveClients 400 #http.worker
KeepAliveTimeout 15

<IfModule prefork.c>
   StartServers 8
   MinSpareServers 5
   MaxSpareServers 20
   MaxClients 256
   MaxRequestPerChild 1000
</IfModule>

<IfModule worker.c>
   ServerLimit 40
   StartServers 20
   MaxClients 400
   MinSpareThreads 25
   MaxSpareThreads 75
   ThreadsPerChild 25
   MaxRequestsPerChild 1000
 <IfModule>
   

-- 
Ted Knab
Stevensville, MD USA



More information about the Lugstuff mailing list