Welcome! Log In Create A New Profile

Advanced

Re: When does nginx return a Bad gateway (502)?

Nikolas Stevenson-Molnar
March 19, 2013 04:48PM
In my experience, Nginx returns 502 when the upstream server (Unicorn in
your case) doesn't respond or terminates the connection unexpectedly.

_Nik

On 3/19/2013 1:29 PM, fastcatch wrote:
> I have an application behind nginx (Rails on Unicorn if it matters) which
> listens on a UNIX socket.
>
> It all works nice, especially when load is low. When there is some load on
> the server though (say 70%), I randomly(?) get a bunch of 502 responses --
> usually in batches.
>
> Thus the question: when (under what conditions) does nginx send a 502
> response?
>
> Thanks in advance,
>
> fastcatch
>
> PS: The app's worker processes do not seem to be irresponsive, slow, blocked
> for IO or anything else I have been able to identify as a possible cause.
> Thus I want to understand more the nginx side so as to find the root cause
> -- which I believe is on the other side (or some config tweak needed
> soemwhere).
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,237573,237573#msg-237573
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

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

When does nginx return a Bad gateway (502)?

fastcatch March 19, 2013 04:29PM

Re: When does nginx return a Bad gateway (502)?

Nikolas Stevenson-Molnar March 19, 2013 04:48PM

Re: When does nginx return a Bad gateway (502)?

fastcatch March 20, 2013 06:03AM

Re: When does nginx return a Bad gateway (502)?

fastcatch March 21, 2013 06:03AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 300
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