Launch FastCGI process?
phill at activityhq.com
Wed Oct 21 11:39:11 MSD 2009
> Hi Igor,
> In fact, if it's integrated it is already better :-)
> Although lighttpd has the spawn-fcgi tool, it still integrates this
> functionality into lighttpd itself and this makes setting up simple
> servers and managing them a lot more easier!
AFAIK lighty just "talks" to the spawnfcgi daemon. Nginx could maybe do
the same with a plugin, but it wouldn't be managing the fastcgi
> As a matter of fact, I don't quite understand why the replies so far are mostly
> negative about integrating a nice feature into nginx. I think a lot of lighttpd
> users are using this feature and like it a lot. It's only an option in lighttpd
> and you don't have to use it. Phillip mentioned that if a child process is
> bad it may bring down the web server. I have never seen this myself.
I had this issue consistently while using lighttpd+spawnfcgi+PHP5.
PHP+spawnfcgi would leak memory slowly filling out what was available,
and lighty would balk when a connection couldn't be made or a response
wasn't returned correctly. This was a couple of years ago now; things
might've changed. I remember plastering the boards and even emailing Jan
directly with no results. Nginx had just made some headlines, so I
switched. We now use it on 6 production servers with PHP, Python, and
Java backends and haven't had *any* problems that weren't down to silly
misconfigurations (on my part - resolved with help from this amazing
> What I have seen is, if the fcgi process throws an exception and exits,
> lighttpd automatically starts another one. How nice! I really hope nginx
> does it, too!
Well, no - nginx doesn't do anything about it other than capture the
error and move on. That's the job of the process manager. Its the same
in lighttpd; spawnfcgi manages the fcgi processes, not lighttpd. All
you're doing is swapping spawnfcgi for supervisord (or God, or
whatever). As Roger mentions, the reason to use a process manager is to
separate concerns. Nginx is concerned with serving content (either from
disk or from an upstream), process managers are concerned with keeping
processes running. Its part of the unix philosophy: "Write programs that
do one thing and do it well."
More information about the nginx