I think this has been discussed before, but I'm wondering if anyone has made any progress.
I was having problems with PHP 5.2 + Nginx that Dreamhost provide hitting 502 Bad Gateway errors. I believe this is due to a PHP process locking/dying and not being able to be killed & restarted. The only way I could fix the problem was manually using 'killall -s 9 php5.cgi' to force kill the processes & then restart nginx ('/etc/init.d/nginx restart').
I have since installed my own version of PHP (5.3.12) with PHP-FPM enabled, but I am still getting the same problem even with PHP-FPM. All of the PHP-FPM processes will stop responding & I'll get the dreaded 502 again. The only way to get them back is to use killall again. Even restarting the daemon doesn't work. Instead it creates a new instance & uses twice the memory.
I have no idea how to fix this, and it appears neither do the (lovely) people at DreamHost support. At the minute I'm stuck as I thought upgrading to PHP-FPM was supposed to fix this problem & yet it seems to still be there for me.
Does anyone have any ideas at all? Any tips, no matter how small, would be greatly appreciated.