lighttpd forum lighty > Lighttpd 1.4.19 and 501 that restarting lighty doesn't solve

Posted by Maciej Lisiewski
on 15.07.2008 23:34
Here is the story:

I use Lighty 1.4.19 with fcgi & php.
About once a day all I can get is 501 service unavailable, for which I 
have failed to track a reason for. Simply at some point no new requests 
are passed to php-cgi processes, which remain idle and the request queue 
builds up until they are marked as overloaded.

First guess: server overload, but no - when it happens cpu load is below 
50% and there are no excessive io operations. Once 501 starts appearing 
it drops to < 10% and all php-cgi processes are exactly at 0.

Second: server load spike due to cron job, or something similar, causes 
fcgi processes to marked as dead. No dice - no time pattern, I have even 
disabled all cron jobs to check it.

Third: php-cgi processes just die due to some fcgi bug. Nope. restarting 
lighty does not solve that, even if I make sure all php-cgi processes 
are killed with it - killall -9 php-cgi. If I restart just Lighty + fcgi 
+ any other web related services (like mysql) nothing changes - to make 
a difference I have to reboot..

To make it even more bizarre it sometimes fixes itself without any 
intervention - it just starts working after a couple of minutes. Or not. 
It's random. Oh, and the very same configuration (including php 
executed) has worked just fine for last couple of months.


Any idea what else I could be looking for? I am pretty much done with 
the normal stuff and I am ready to test borderline impossible reasons 
should they lead to a solution.