[FASTCGI] Some delay for spawning process a second time
Olivier Le Cam
Olivier.LeCam at crdp.ac-versailles.fr
Fri Nov 14 13:13:37 EST 2008
Hi -
Setup based on Apache (2.2.3-4+etch5) + libapache2-mod-fastcgi (2.4.2-8)
+ php5-cgi (5.2.6-0.dotdeb.1)
Everything is working fine with this setup except for an abnormal long
delay for spawning a new php5-cgi through suexec for the second time
(after the first one has been killed).
Way to repeat the problem:
1. Apache just (re)started
2. Access to a virtualhost, say http://test.mydomain.com
This takes approx. 0.5s which is fine
2. Access to this site again
This takes approx. 0.04s which is still fine
3. Wait that the spawned process php5-cgi for this virtualhost is killed
by fcgi-pm. Then access to the site again. Now it takes more than 3s to
get the php5-cgi spawned. After that, time access is back to normal
(~0.04s) untill the process is killed (then the 3s delay come back for
the next spawn).
I have this in my Apache conf:
FastCgiWrapper /usr/local/lib/apache2/suexec-fcgi
FastCgiConfig -minProcesses 0 -maxClassProcesses 1 -maxProcesses 300 \
-processSlack 30 -singleThreshold 20 -killInterval 240
AddHandler php5-fastcgi .php .php3 .php4 .php5
<Location /cgi-bin/php5-fcgi>
SetHandler fastcgi-script
Options +ExecCGI
</Location>
Action php5-fastcgi /cgi-bin/php5-fcgi
AddType application/x-httpd-php .php5
And this is the cgi-bin/php5-fcgi wrapper:
#!/bin/sh
export PHPRC="/web/s/t/test/php-configs/php5/"
export PHP_FCGI_CHILDREN=0
export PHP_FCGI_MAX_REQUESTS=1000
exec /usr/bin/php5-cgi
I spends some time attaching strace to fcgi-pm and Apache process, but I
sadly didn't get a chance to figure out what could be the problem.
Does this sound to someone?
Any help/hint/idea will be greatly appreciated. Thanks in anticipation!
Regards,
--
Olivier Le Cam
CRDP de l'académie de Versailles
More information about the FastCGI-developers
mailing list