Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Currently I have a cron that restarts PHP-FASTCGI every 15 minutes but.....yea. 64 bit - Debian 5 nginx 0.6.32

share|improve this question
    
It'll help if you could provide some details on the problem - is it a cpu hang, disk hang, network hang, etc... are you running in a VM or real machine? More info please. –  sybreon Apr 19 '11 at 7:06
    
Exactly what does "but.....yea" mean? It's not a technical term I'm familiar with. –  John Gardeniers Apr 19 '11 at 8:05

3 Answers 3

Use PHP-FPM instead of standard FastCGI. FPM works great with nginx.

share|improve this answer

try to install apache as backend for nginx php cgi. this solution is widly spread.

share|improve this answer

In addition to vartecs advice;

1) upgrade your nginx, 0.6.x is pretty old.

2) once php-fpm, configure /status and /ping to monitor it.

3) You might want to use nginx HttpStubStatusModul.

4) Something I've read on lightys wiki:

"This problem seems to stem from a little-known issue with PHP: PHP stops accepting new FastCGI connections after handling 500 requests; unfortunately, there is a potential race condition during the PHP cleanup code in which PHP can be shutting down but still have the socket open, so lighty can send request number 501 to PHP and have it "accepted", but then PHP appears to simply exit, causing a 500 return from lighty.

To limit this occurance, set PHP_FCGI_MAX_REQUESTS to 500."

5) If nothing helps, you might want to play with php.ini's max execution time and php-fpm's debug + slowlog

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.