Re: Processes dying prematurely

Chris Lightfoot <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
On Fri, Aug 25, 2006 at 08:54:42AM -0400, Ben Chabot wrote:
> I may have simply set this up incorrectly.  Should I be calling something
> else?  Is there a php-pm application somewhere that calls these workers? 
> Or is php with --enable-fastcgi supposed to spawn workers on it's own?

PHP has two modes in its FastCGI implementation. One has a
manager process which manages a set of child processes,
all accepting and processing connections; those child
processes then parse and run the actual PHP code. The
other mode runs the interpreter in a single process. My
experience is that the former mode is much more reliable
than the latter; if you want mod_fastcgi or another
process manager to manage the PHP processes, then set
PHP_FCGI_CHILDREN to 1.

The default *used* to be PHP_FCGI_CHILDREN=8 (and this is
still what the documentation says) but at some point it
was actually changed to 0, which enables the
single-process mode (the second one described above).

If you're starting PHP through some other mechanism, e.g.
as an external server, then you may as well set
PHP_FCGI_CHILDREN to some reasonable value and leave it to
manage itself. That will save you some memory because of
copy-on-write (though not much probably).

-- 
``Our fear of terrorists, it seems, is exceeded only by
  our desire to watch them on television.'' (Jonathan Shainin)
___________________________________
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.