I wrote a simple php program as:
<?
$r="";
for($i=0;$i<1000000;++$i)
$r.="sdjkfhsldkjfhsdlf".time();
?>
then bind lighty in localhost, then start ab:
/usr/local/apache2/bin/ab -n 100000 -c 200 http://127.0.0.1/s.php
top shows phps are very busy:
PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND
29035 www 1 125 0 81656K 14240K RUN 0:33 5.27% php
29045 www 1 125 0 90428K 14248K *SYSMA 0:33 5.22% php
29047 www 1 125 0 90428K 14244K *SYSMA 0:33 5.18% php
29034 www 1 124 0 90668K 16776K *SYSMA 0:34 5.13% php
29039 www 1 125 0 90396K 22264K *SYSMA 0:34 5.13% php
29042 www 1 124 0 90492K 23084K RUN 0:33 5.13% php
29037 www 1 124 0 90396K 17300K RUN 0:33 5.13% php
29036 www 1 124 0 90332K 14196K *SYSMA 0:34 5.08% php
After about 30 seconds, lighty.error.log said:
2006-10-25 18:20:15: (mod_fastcgi.c.3423) all handlers for /s.php on .php are down.
then answers 500 to every request.
I interrupted ab, and wait until php progresses are idle, but lighty still refused to reply.