Re: idle-timeout & spawn time of process

David Birnbaum <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
idle-timeout is how long apache will wait for a FastCGI process to "wake up". 
You're looking to adjust the parameters under the Dynamic processing (read the 
manual for tuning those options).

If you want to pre-fork, then set a static FastCGI server for php, then there's 
no wait time, it will always be running.  If PHP is dying, check for core files 
or error messages in the logs.

David.

-----

On Tue, 13 Sep 2005, Ruben van der Zwan wrote:

> 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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.