spawn-fcgi-1.6.0rc1-r16 prerelease]

Grzegorz Nosek grzegorz.nosek at
Mon Mar 9 01:30:30 MSK 2009

On nie, mar 08, 2009 at 11:02:02 +0100, Icy -- wrote:
> I have never used fcgiwrap and in fact just discovered it. As I 
> understand it, it uses fcgi to then spawn cgi processes? Why not code 
> the application as a FastCGI one? That would be way faster in terms of 
> performance.
> The only reason you would need that is to either run CGI apps on a 
> remote host or to overcome the lack of cgi support in nginx.

Well, I wrote it to run unmodified CGI scripts under Nginx. Yes, it's
basically a FastCGI server that handles requests by running CGI scripts
and passing data to/from them.

> And all you find via google are invalid bugreports. Saying something can 
> be found on the internet doesn't make it true.
> Again I think you guys completely misunderstand the role of spawn-fcgi.
> It sets up some sockets and spawns a processes. That's basically it.
> It is in NO way involved with handling the requests. If something 
> crashes or hangs then that's the fault of the application. PHP in this 
> case (and it has been known to do so in past releases).
> This is not spawn-fcgi's fault. After spawning the application, 
> spawn-fcgi is no more around normally. How can something that is not 
> running cause such problems?


> > Aside from that, even though fcgiwrap is capable of running several 
> > processes simultaneously, spawn-fcgi will only start one. I may be wrong 

... one fcgiwrap, which can then fork into several ones, overcoming that

> > but I believe that's an inherent limitation of spawn-fcgi's command 
> > options.

I believe that's just a missing feature. There's nothing (except added
complexity of process management) preventing spawn-fcgi from adding a
--prefork=<num> option.

> You can of course (as I said earlier) start multiple processes by 
> calling spawn-fcgi multiple times (with different command options for 
> the address).

This is not equivalent. If I want multiple identical FastCGI processes,
I always run them on the same socket to completely avoid load balancing

> Telling spawn-fcgi to spawn like 10 processes is not possible because 
> how should it know which addresses to bind to?

Run them all on the same socket.

Best regards,
 Grzegorz Nosek

More information about the nginx mailing list