Fast CGI (spawn-fcgi / php-cgi) crashes/dies/hangs

miradev nginx-forum at
Wed Dec 9 15:24:13 MSK 2009

Let me just start with a 'thank you' to you all for your spirited replies. Seriously. I would dearly like to answer you all individually, but I'm not sure that'd be sensible :)

We're a small outfit, with me as the only permanent IT person (development, admin, support e.t.c).

The relevant production setup is Rackspace managed Redhat. The requirement I am looking for is a small footprint solution that can ultimately be ported elsewhere (e.g. slicehost). I want to keep things as much 'out of the box' as possible, as Rackspace then take away a lot of my headaches. Anything I play with does not fall under their contractual obligations (this is my main reason for not recompiling PHP).

This particular server setup is: nginx at the front, from which things split two ways. One way is to Apache+mod_perl which (unavoidably) creates *large* threads (serving some heavy data-munging). The second is fcgi+php mainly serving Wordpress. Currently the two 'services' must live side-by-side on one server (love the legacy).

The reason for not using Apache for WP is twofold. Firstly, apache has a higher memory footprint making it unsuitable for us to scaling down to, for example, a 256MB slice. Secondly, I don't want it sharing the large apache threads and I haven't found a way of reliably running a second apache configuration alongside.

I'm convinced that my initial premise (this is not an nginx issue) is correct, so if this is too offtopic I am happy to continue this elsewhere.

What I have learnt, from reading this thread, and some more web content, is that there is nothing wrong with my setup. I'm pretty happy with apache and fcgi in a stand-alone situation. So I am going to stick with ngnix+php-cgi. Which means I need to manage/admin things better. 

The advice I will take is to install supervisord on my dev box and learn how to manage my php-cgi processes properly. One crash in 6 months is not indicative of a systemic problem.



I know spawn-fcgi is not a process manager. I know spawn-fcgi is not a process manager.
I know spawn-fcgi is not a process manager. I know spawn-fcgi is not a process manager.

PPS: nginx rules ko!

Posted at Nginx Forum:,28783,29193#msg-29193

More information about the nginx mailing list