How to restart php-cgi automatically with spawn-fcgi
Posted
by
mrm8
on Server Fault
See other posts from Server Fault
or by mrm8
Published on 2011-05-30T20:55:32Z
Indexed on
2012/09/12
3:40 UTC
Read the original article
Hit count: 630
I'm running nginx with php as fcgi. It's working just fine, however, php-cgi keeps on exit()ing after serving 500 requests. I tried increasing that value (PHP_FCGI_MAX_REQUESTS), and that worked, but that seems to be a workaround. Then I set it to 0, and it didn't exit() yet. But I think there's a reason why php-cgi should be restarted. At the moment, I'm running php-cgi with spawn-fcgi: when the php process exits, spawn-fcgi exits, too. Now, is there a way to automatically restart php (without dirty hacks like while [ 1 ]; do spawn-fcgi; done
etc)?
© Server Fault or respective owner