-1

I just upgraded php-fpm and my server has gone away with a 502 bad gateway I've been searching for solutions and came across some like this:

https://stackoverflow.com/a/10470827/1612432

and this

Getting 502 bad gateway after updating php to 5.5

But with no luck. I've changed fastcgi_pass from a unix socket to 127.0.0.1:9000 and in the php pool listen = 127.0.0.1:9000. But I keep getting the 502

Here are my config files:

In the nginx config:

upstream php {
       #server unix:/var/run/php-fpm.socket;
       server 127.0.0.1:9000;
}

And later on my site config I have:

fastcgi_pass php;

In my php pool:

listen = 127.0.0.1:9000

Some error logs from nginx log

 2015/03/23 10:38:48 [error] 14365#0: *485 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 66.249.78.19, server: elbauldelprogramador.com, request: "GET /tag/configurar-prefetch-windows-8/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "elbauldelprogramador.com"

I've also noticed this warning in php logs:

[23-Mar-2015 12:38:59] WARNING: [pool www] child 33877 exited with code 127 after 5.620225 seconds from start

After searching a bit more, it seems that the problem is in swaping php workers, I do not know what means the error code 127, but when the server was running it always was 0.

If you need more config files, please tell me.

1 Answers1

1

I've found the root cause of the problem. After the php update, the apc extension I have in my php.ini was no longer working, all its all right now after commenting this line:

extension=apc.so

Hope it helps.