Forum: NGINX Random 502 bad gateway with php-fpm, why?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2974d09ac2541e892966b762aad84943?d=identicon&s=25 justin (Guest)
on 2013-11-14 19:13
(Received via mailing list)
My PHP application went down for a few hours with 502 bad gateway. In
the
nginx error log all I see is:

2013/11/14 10:02:16 [error] 1466#0: *57964 recv() failed (104:
Connection
reset by peer) while reading response header from upstream

I fixed it by restarting php-fpm. However, what caused this? I don't see
anything interesting logged in the php-fpm or php logs. No indication of
why
happened, and why simply restarting php-fpm fixed the issue. I thought
that
php-fpm auto-restarted processes if they fail?

Any insights and place to determine the root cause? Thanks.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,244669,244669#msg-244669
A8cae7780631b0e946f4826cd06128a6?d=identicon&s=25 Toni Mueller (Guest)
on 2013-11-15 23:55
(Received via mailing list)
On Thu, Nov 14, 2013 at 01:13:08PM -0500, justin wrote:
> My PHP application went down for a few hours with 502 bad gateway. In the
> nginx error log all I see is:
>
> 2013/11/14 10:02:16 [error] 1466#0: *57964 recv() failed (104: Connection
> reset by peer) while reading response header from upstream

I recently hit the same problem and was able to ameliorate it by upping
the OS limits (open files etc.). There are some discussions around this
problem on stackoverflow and friends which suggest that one has to
experiment.


Kind regards,
--Toni++
2974d09ac2541e892966b762aad84943?d=identicon&s=25 justin (Guest)
on 2013-11-15 23:59
(Received via mailing list)
Hey Tony.

Can you link to the stackoverflow posts? I wish php-fpm told me what
happened.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,244669,244724#msg-244724
A8cae7780631b0e946f4826cd06128a6?d=identicon&s=25 Toni Mueller (Guest)
on 2013-11-16 00:03
(Received via mailing list)
On Fri, Nov 15, 2013 at 05:58:41PM -0500, justin wrote:
> Can you link to the stackoverflow posts? I wish php-fpm told me what
> happened.

See, my memory. =8-((

It was this link that helped me most:

http://forum.nginx.org/read.php?11,215606,235395


Cheers,
--Toni++
This topic is locked and can not be replied to.