The cause was probably that I ran out of disk space, causing everything to work strangely. I will leave this question up anyways in case anyone else has a similar issue.
I have a few PHP scripts that have hung for a long time, but apparently they are not really using much CPU time as they don't get killed. Still they are making it impossible for lighttpd to spawn any more PHP processes as the maximum amount of them has been spawned already.
I'm aware of the set_time_limit that can be used as a function or put into php.ini to control the maximum CPU time a script can run. What I want is to limit all PHP scripts run by my web server (lighttpd) not in CPU time, but clock time.
In case it matters, this is the PHP part from my lighttpd config file.
fastcgi.server = (".php" => ((
"bin-path" => "/opt/local/bin/php5-cgi",
"socket" => "/tmp/php.socket" + var.PID,
"min-procs" => 16,
"max-procs" => 16,
"idle-timeout" => 15,
Here is my server-status from lighttpd. You can see that PHP has been running much longer than I bargained for and has caused the server to clog up. Strangely there also seem to be more PHP procs than my max-procs.
. = connect, C = close, E = hard error
r = read, R = read-POST, W = write, h = handle-request
q = request-start, Q = request-end
s = response-start, S = response-end
Client IP: Read: Written: State: Time: Host: URI: File:
22.214.171.124 0/0 0/0 handle-req 1361 ... (a PHP script)
126.96.36.199 0/0 0/0 handle-req 1420 ... (another PHP script)
... gazillion lines removed ...
Any ideas that could help me set up a configuration that I don't have to constantly babysit would be much appreciated!
posted date: 2008-12-17 07:12:00