On 08/04/2013 10:15, Ashly Pridmore wrote:


We are using Apache as a front end for communication to a number of devices using TR69 (SOAP over HTTP). In order to resolve a problem with a particular device, I need to enable KeepAlive, but upon doing so I find that a number of our other devices drop connection to the server until they are rebooted. The reboot requirement is an acknowledge bug from the vendor, but I would like to resolve the problem with the device communication as it suggests capacity issues with our current configuration of Apache.

At present, with KeepAlive disabled, the command

netstat -plan|grep :80|wc -l

returns a value between 5000 and 5500. This drops dramatically if keepalive is enabled, to around 300 to 400.

At present, Apache is configured as:

Timeout 120
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 5

<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 1024
MaxClients 1024
MaxRequestsPerChild 0 #unlimited

<IfModule worker.c>
StartServers 2
MaxClients 1000
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0

The issue appears to be that when I enable KeepAlive with this configuration Apache intermittently stops accepting connections on the socket. We found that before changing the httpd.conf file (we raised the max clients and maxrequestsperchild variables) and enabling KeepAlive meant that I was intermittently unable to telnet into the server on port 80, suggesting a capacity issue.

I am wondering how high would be an acceptable limit for these values, and if anyone had any other ideas for what might be causing this.

Thanks in advance!

At least say if u run prefork of worker mpm.

KeepAlive is not recommended for a high traffic generally.
In both configus you have too much delta between startserver/spareservers and maxclients. Apache spawn childs at fixed rate so it dont follow high connections peaks

Simone Caruso
IT Consultant
+39 349 65 90 805