I was having problems with spawn-fcgi-standalone occasionally resulting in dead PHP processes, which caused 502 Bad Gateway errors on my site. Crontabbing an /etc/init.d/init-fastcgi start didn’t help much, so I looked for other ways to do it. Supervisord looked promising.

I came across some webpages that suggested php-fcgi wasn’t the most reliable way to do it (long pages would die, etc.), and that fpm or supervisord might be better. This way, I can keep the extraneous bad gateway errors from my error logs, and focus on what’s causing the occasional process to die.

perusio

Have you heard of Monit? I use for supervising both nginx and php-cgi. It’s written in C and not in Python. http://mmonit.com

Yea, supervisord only logs in bursts when there is enough data for the particular process. In my case it was only writing when there was ~1K worth of data (and it was a timed job, so it appeared to be related to time – but that was not the case).

I have also seen some strange behavior with the log rotation. For example, if you are logging to test.log, sometimes you will find it is logging to test.log.5

A ls -lart helps with that :)

All things considered, supervisord has been doing a great job. We have been using it in production for a couple months.

sachac M-x customize-variable, or you can look for org-modules in my config at http://sachachua.com/dotemacs to see how I do it with (setq org-modules ...) and (org-load-modules-maybe... – Org-mode and habits