Posted by Chipie on August 24, 2010 at 9:31am
I have followed the instructions at http://github.com/yhager/nginx_drupal to run my druapal sites with nginx. The php-cgi server process dies at least once a day, so I have to restart the server manually. Can I have this done automatically? What is the best was, to start the php-cgi server on debian lenny?

Comments
That's strange.
I'm running a Lenny on Linode like you and I've never experienced that.
Notwithstanding, I'm in the process of setting up monit to supervise both the php fastcgi process and nginx.
BTW what do folks use around here to set up daemon supervision?
That's strange.
I'm running a Lenny on Linode like you and I've never experienced that.
Notwithstanding, I'm in the process of setting up monit to supervise both the php fastcgi process and nginx.
BTW what do folks use around here to set up daemon supervision?
For init.d startup script I use this init script, named php5-fcgi. I've installed it with:
update-rc.d php5-fcgi defaults 99Then just launch the process with
/etc/init.d/php5-fcgi start. Then if you do top or htop you should see the php fcgi process(es) there.Making it Easier to Spawn php-cgi on Debian and Ubuntu
I am using this script to start php-cgi.
My script for launching the PHP FastCGI daemon
I suppose that you solved you problem already. Anyway here's my version of the
Fast CGI init script.
It might be of use to someone else: feel free to comment on it.
Get rid of the spawn-fcgi
package from lighty. It's not necessary. I've browsed the foruns and nginx ML and there's a lot of people reporting issues like the one you're having with running php fcgi with spawn-fcgi.
Use the script I pointed to. That's my advice.
You could move to php-fpm if
You could move to php-fpm if don't mind patching a couple contrib modules for php5.3 compatibility.
http://www.dotdeb.org/2010/07/25/php-5-3-3-packages-are-available/
I don't use a supervisor daemon. I hear that supervisord is also good.