I finally caught the server in the process of falling over. The daemon
did restart, but the server-status showed some very interesting stuff
just prior:
Current Time: Saturday, 01-Aug-2015 18:25:20 EDT
Restart Time: Saturday, 01-Aug-2015 16:00:10 EDT
Parent Server Generation: 0
Server uptime: 2 hours 25 minutes 9 seconds
Total accesses: 2511 - Total Traffic: 9.3 MB
CPU Usage: u3406.38 s0 cu0 cs0 - 39.1% CPU load
.288 requests/sec - 1119 B/second - 3882 B/request
508 requests currently being processed, 0 idle workers
WWWWWWWWWWWWWWKWWWWWWWWKWWWWWWWWWWWWWWWWWWWWKWWWWWWWWWWWWWWWWWWW
WKWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWKW
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWKWWWWWWWWWWWWWWWWWWWWWWWW
KWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWKWWWWWWWWWWWWWWWWWW
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWKWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..
................................................................
The vast majority of those connections being written were returns for a
Google maps plugin for a Joomla site. However, that's not what's really
interesting. We should not have run out of idle workers. The MPM says:
ThreadStackSize 262144
StartServers 2
MinSpareThreads 50
MaxSpareThreads 60
MaxRequestsPerChild 0
We should have continued to spawn threads until we ran out of resources
(memory fragmentation might be a possibility, but the box had not been
up that long for me to expect this to be an issue, and there was plenty
of available RAM - over a gig).
server-config clearly shows that the MPM settings are being read.
MaxKeepAliveRequests? That is set for 500, with a higher keepalive
timeout than I remembered (300 seconds, which is probably way too high).
THREADS in CONFIG.SYS is set for 1024, so it is conceivable that we
actually did run out of threads. Checking now (system relatively idle),
there are 299 non-httpd threads in use. It is possible, that with the
system under load and responding more slowly (Communigate is currently
using 98 threads), other things could have spawned more threads leaving
only 508 threads available for all httpd processes. The problem for me
is that I saw us hit that number *exactly* on multiple occasions with
Apache restarts in between and even server reboots. Seems a strange
coincidence.
So, in addition to lowering the Apache timeout to 3 and keepalive
timeout to 10 seconds, I bumped StartServers to 5 (from 2) and increased
THREADS in CONFIG.SYS to 2048.
I did see the system get to almost 1,000 current requests, but idle
workers stayed above 0 (though still lower than I would have expected
for 5 processes which should maintain a minimum of 50 spares).
Obviously, more monitoring is required.
Oh, and I fixed the (old) broken Google maps plugin which was
functioning as an open web proxy (ugh...), and have a redirect rule in
place to immediately trash requests for the offending php script.
Anyone else ever run out of idle workers?
--
Lewis
-------------------------------------------------------------
Lewis G Rosenthal, CNA, CLP, CLE, CWTS, EA
Rosenthal & Rosenthal, LLC
www.2rosenthals.com
visit my IT blog
www.2rosenthals.net/wordpress
IRS Circular 230 Disclosure applies see
www.2rosenthals.com
-------------------------------------------------------------
--
This email was Anti Virus checked by Astaro Security Gateway.
http://www.astaro.com