idle-timeout & spawn time of process
"Ruben van der Zwan" <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi All,
I'm running FastCgi for quite some time now, I use it for PHP.
It seems to be impossible to make FastCgi startup faster, the first time it
has to spawn a PHP process. This takes around 1 sec.
To avoid making the not so busy sites look slow, I wanted to increase the
lifetime of the PHP processes. I thought I could achieve this by setting the
idle-timeout directive of FastCgiConfig to a higher number, eg. 900.
I looks like the processes stay alive longer. But when I, after 15 minutes
(with the processes still running) make a request, it works only once, after
which the PHP processes still die.
Can somebody explain to me what the idle-timeout directive is supposed to
do, or point me to a solution for what I'm trying to accomplish? The best
thing would still be to minimize the startup time of the PHP script. On the
CLI it starts instantly...
Thanks,
Regards,
Ruben van der Zwan
-------------------------
Relative part of httpd.conf:
AddType application/x-httpd-php .php
Action application/x-httpd-php /fcgi-bin/php.sh
<Location /fcgi-bin/>
SetHandler fastcgi-script
Options +ExecCGI
</Location>
FastCgiWrapper /usr/local/sbin/suexec
FastCgiConfig -init-start-delay 0 -appConnTimeout 2 -startDelay 1
-restart-delay 0 -idle-timeout 900
FastCgiConfig -maxClassProcesses 5 -maxProcesses 50
FastCgiConfig -singleThreshold 100 -killInterval 900
FastCgiConfig -pass-header Authorization
<VirtualHost *:80>
ServerAdmin admin-WI0L6dQK/VpWk0Htik3J/[email protected]
DocumentRoot /usr/www/www.hostname.com/public_html
ServerName www.hostname.com
SuexecUserGroup user user
ScriptAlias /fcgi-bin/ /usr/www/www.hostname.com/etc/
</VirtualHost>
-------------------------
The php.sh looks like this:
#!/bin/sh
PHPRC="/usr/www/www.hostname.com/etc"
export PHPRC
PHP_FCGI_CHILDREN=1
export PHP_FCGI_CHILDREN
exec /usr/local/bin/php
-------------------------
System: FreeBSD 5.4-RELEASE-p6
Apache 2.0.54
PHP 5.0.5
Mod_fastcgi 2.4.2
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/