PHP cgi locks up and times out.
- by Oli
I've got a dozen wordpress sites hosted on a nginx/php-cgi setup. After a variable amount of time (usually not that long, and occasionally very fast) PHP locks up and after 2 minutes (the timeout I set in nginx), it get a 504 timeout.
I've tried everything I can think of. I've been using an init script to launch php-cgi but I compiled out php-fpm and tried that for a day with various configurations with the same results.
I've tried a low number of PHP_FCGI_CHILDREN. I've tried as high as my RAM will let me. I've tried various settings for PHP_FCGI_MAX_REQUESTS. xcache seemed to exacerbate the issue, so I removed it.
The server is a VPS but it has over a gig of ram dedicated to it.
All suggestions are welcome at this juncture because I'm desperate.