Nginx + PHP-FPM 502 Bad Gateway

I get 502 Bad Gateway from Nginx in a line of PHP code that works fine elsewhere in my program ( $this->provider = new OAuthProvider(); ), and it worked fine before. This is the message I get in the Nginx error log for every 502:

recv () failed (104: Connection reset on a peer) while reading the response header upstream

There is a warning for every 502 in the PHP-FPM log:

[WARNING] [pool www] child 17427 exited SIGSEGV signal 11 after 142070.657176 seconds from the start

After a few changes to nginx.conf, I'm stuck and really appreciate any pointers on what to do next.

I am running Nginx 0.7.67 and PHP 5.3.2 on Ubuntu 10.04.

+16
php nginx
Sep 01 '10 at 8:22
source share
6 answers
+5
Sep 01 2018-10-10T00:
source share

Your PHP process crashed with segfault (“11 SIGSEGV signal”), which caused Nginx to see a “reset by peer connection” (PHP is “peer” in this case, and Nginx tells you “Look, it hung up on me, before I could get an answer from him ").

Check out the PHP Bug database page for how to report a bug that someone wants to fix to find out how to get a segfault return line so you can report it.

+2
Sep 01 2018-10-10T00:
source share

I had the same problem with APC. so I uninstalled it and installed eaccelerator instead. not a problem yet.

+1
Oct 06 '10 at 6:16
source share

I had similar problems with nginx / lighttpd + php-fcgi (using spawn-fcgi), do you use any kind of cache code for php? What I found a long time ago was that xcache caused strange behavior in php-fcgi, some php-fcgi processes accidentally died, I could not find any template. I would recommend taking a look at the apc settings (or other opcode) if you use them. Right now I am using nginx + php-fpm on freebsd and have no problems.

0
Sep 01 '10 at 13:41
source share

ZendOptimizer + APC + php-fpm 5.2.14 gives constantly reproduced SIGSEGV even on phpinfo () ;.

0
Dec 14 '10 at 18:25
source share

Try to disconnect dryssin. Sometimes this causes Apache to crash.

-2
04 Feb '12 at 9:59
source share



All Articles