502 error

Hello all,

have question about 502 Bad Gateway error. Does it generated by Nginx,
or by backend server? If it with in Nginx which module generates it?

Thanks.
M.

Posted at Nginx Forum:

Hello!

On Fri, Jul 13, 2012 at 12:19:25PM -0400, munkhabi wrote:

Hello all,

have question about 502 Bad Gateway error. Does it generated by Nginx,
or by backend server? If it with in Nginx which module generates it?

The 502 is a generic error which is generated if upstream server
doesn’t respond properly, see here:

It may be generated by nginx (if error happens while talking to a
backend), as well as by a backend server (if it talks to some
backends too, and error happens there).

In nginx it’s generated by the upstream module, i.e. it might
happen if you use proxy, fastcgi, scgi, uwsgi or memcached.

Maxim D.