I’m using nginx since some days and I got a little trouble. It seems
that after some while of working fine nginx exits the fastcgi-daemon and
whenever I try to call a php site then, it shows me 502 Bad Gateway.
Then I have to “/usr/bin/php-fastcgi start” and everything runs fine
again.
So basically my question: How do I make the php-fastcgi not exit itself
or how do I make it automatically restart on exit? It’s annoying that my
website everytime turns to “502 Bad Gateway” to everyone and I don’t
even know about that!
And actually it was. No error on that. But then the site says I should
add something to /etc/supervisord.conf, but there is no file like that?
I created it with the content I got told to, but well, nothing happens
now… Or is everything fine now? Is everything automated about
supervisord?
I’m using nginx since some days and I got a little trouble. It seems
that after some while of working fine nginx exits the fastcgi-daemon and
whenever I try to call a php site then, it shows me 502 Bad Gateway.
Then I have to “/usr/bin/php-fastcgi start” and everything runs fine
again.
So basically my question: How do I make the php-fastcgi not exit itself
or how do I make it automatically restart on exit? It’s annoying that my
website everytime turns to “502 Bad Gateway” to everyone and I
don’t even know about that!
add something to /etc/supervisord.conf, but there is no file like that?
I created it with the content I got told to, but well, nothing happens
now… Or is everything fine now? Is everything automated about
supervisord?
run supervisorctl or just use ps check if the php-cgi processes are
running. Set nginx fastcgi_pass to whatever path you set in
supervisord for php-cgi.
I’m using nginx since some days and I got a little trouble. It seems
that after some while of working fine nginx exits the fastcgi-daemon
and whenever I try to call a php site then, it shows me 502 Bad
Gateway.
Then I have to “/usr/bin/php-fastcgi start” and everything runs fine
again.
So basically my question: How do I make the php-fastcgi not exit
itself or how do I make it automatically restart on exit? It’s
annoying that my website everytime turns to “502 Bad Gateway” to
everyone and I don’t even know about that!
Can anyone help me please?
Use one of the many init scripts available throughout the
interwebs. Also I suggest monit for monitoring the process.
I used to do this and I hat php 5.3 running with apache. But when I
decided to try something new to go with nginx instead of apache, I had
trouble setting up nginx with php as that repository doesnt have the
php-cgi package. Therefor all attempts to get any phpinfo() file run
failed and I was forced to uninstall php 5.3 to install php 5.2. I
wasn’t really happy with that, but at least it works at all… So far
I’m only half-satisfied with nginx, but I’m pretty sure thats just about
the config, nginx sounds fine. Gonne read tons of HowTos and Docs and
stuff I suppose
as that repository doesnt have the php-cgi package.
You don’t need the -cgi (it is the old naming when fastcgi was built in
the
cgi sapi) package but ‘php5-fpm’ .
Also I think the packages are prefixed with ‘php5’ and called php5-fpm /
php5-cgi ( http://php53.dotdeb.org/dists/lenny/php5/binary-amd64/ )
So I removed php again, putting dotdeb into sources and commenting
debian out, trying to reinstall php5-common, but this appears:
Package php5-common is not available, but is referred to by another
package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
What am I doing wrong now? I did update apt-get after editing sources
Disregard that, I just directly downloaded the debs with wget. For the
moment its working, thanks alot! I hope it won’t crash down every now
and then anymore.
Thanks alot again to anyone who spent his time in this thread!