Welcome! Log In Create A New Profile

Advanced

Re: Nginx + PHP FASTCGI FAILS - how to debug ?

Don Burris
June 20, 2010 05:32PM
Usu wrote:
> Hi, I'm having the same problem for a few weeks now, after x hours/days
> php becomes unresponsive, I've already changed 2 different php-fastcgi
> spawning scripts and tried php-fpm as well, switched between many
> version of the php 5.2 and 5.3 branches but the problem still remains so
> I don't think it's a php issue even if that would be the most logical
> conclusion.
>
> When php becomes unresponsive (502 bad gateway error) all the
> php-cgi/php-fpm processes are still running and I can see them in top/ps
> aux, when I restart php everything start to work again.
>
> I don't know if it's releated, but while I was browsing this forum a few
> minutes ago I got the 502 error with the same behavior it has when it
> happens on my site, it lasted some minutes than someone took care of it.
> Also, take a look at this discussion:
> http://groups.google.com/group/highload-php-en/browse_thread/thread/a3809a50eba71a45
> I think that this is a nginx bug, it would be nice if some developer
> could look into this, I could provide error logs and such if needed,
> just let me know, thanks!
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,40332,70942#msg-70942

I realize you may have moved on; some time has passed since you posted
this problem. However, I had the same issue and I was able to fix it.
The user nginx runs as in a default setup is "www-data", or "nobody".
Nginx has insufficient permissions to communicate with
fastcgi://127.0.0.1:9000 which usually runs as root. So if you use
spawn-fcgi, you must run it with the -U flag, and specify the same user
that nginx runs as. For example:

spawn-fcgi -a 127.0.0.1 -p 9000 -C 5 -f /usr/bin/php-cgi -U nobody

or if you use sockets

spawn-fcgi -s /var/run/fcgi.sock -C 5 -f /usr/bin/php-cgi -U nobody

My problem was identical to yours, php would work for a moment, then
become unresponsive even though the processes were still running. I hope
this helps, this problem was very frustrating.
--
Posted via http://www.ruby-forum.com/.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx + PHP FASTCGI FAILS - how to debug ?

Niro January 12, 2010 01:05PM

Re: Nginx + PHP FASTCGI FAILS - how to debug ?

merlin corey January 12, 2010 07:52PM

Re: Nginx + PHP FASTCGI FAILS - how to debug ?

war59312 February 11, 2010 11:13PM

Re: Nginx + PHP FASTCGI FAILS - how to debug ?

Daniel Hahler February 12, 2010 08:24AM

Re: Nginx + PHP FASTCGI FAILS - how to debug ?

Reinis Rozitis February 12, 2010 09:14AM

Re: Nginx + PHP FASTCGI FAILS - how to debug ?

Piotr Karbowski February 12, 2010 09:20AM

Re: Nginx + PHP FASTCGI FAILS - how to debug ?

shaktale February 12, 2010 01:30PM

Re: Nginx + PHP FASTCGI FAILS - how to debug ?

Usu April 03, 2010 06:51PM

Re: Nginx + PHP FASTCGI FAILS - how to debug ?

jjjx128 April 03, 2010 11:09PM

Re: Nginx + PHP FASTCGI FAILS - how to debug ?

Usu April 04, 2010 03:55AM

Re: Nginx + PHP FASTCGI FAILS - how to debug ?

unclepieman April 04, 2010 02:38PM

Re: Nginx + PHP FASTCGI FAILS - how to debug ?

unclepieman April 03, 2010 10:48PM

Re: Nginx + PHP FASTCGI FAILS - how to debug ?

Usu April 04, 2010 02:59PM

Re: Nginx + PHP FASTCGI FAILS - how to debug ?

unclepieman April 04, 2010 03:19PM

Re: Nginx + PHP FASTCGI FAILS - how to debug ?

Usu April 04, 2010 03:21PM

Re: Nginx + PHP FASTCGI FAILS - how to debug ?

Don Burris June 20, 2010 05:32PM

Re: Nginx + PHP FASTCGI FAILS - how to debug ?

franky gman August 11, 2011 01:08PM

Re: Nginx + PHP FASTCGI FAILS - how to debug ?

Volodymyr Kostyrko August 12, 2011 01:38AM

Re: Nginx + PHP FASTCGI FAILS - how to debug ?

Reinis Rozitis August 12, 2011 07:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 272
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready