0

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

2
  • 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, 2011 at 7:06
  • 1
    Exactly what does "but.....yea" mean? It's not a technical term I'm familiar with. Apr 19, 2011 at 8:05

3 Answers 3

1

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

0

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

0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .