we need an explicit max_fails flag to allow origin error through?

Mark McDonnell mark.mcdonnell at buzzfeed.com
Thu Sep 15 13:55:47 UTC 2016


We have an upstream that we know is serving a 500 error.

We've noticed that NGINX is serving up a nginx specific "502 Bad Gateway"
page instead of showing the actual Apache origin error that we'd expect to
come through.

To solve this we've added `max_fail: 0` onto the upstream server (there is
only one server inside the upstream block) and now the original apache
error page comes through.

I'm not sure why that is for two reasons:

   1. because max_fail should have no effect on the behaviour of something
   like proxy_intercept_errors (which is disabled/off by default, meaning any
   errors coming from an upstream should be proxied 'as is' to the client)

   2. because max_fail should (according to nginx's docs) be a no-op... "If
   there is only a single server in a group, max_fails, fail_timeout and
   slow_start parameters are ignored, and such a server will never be
   considered unavailable"

​Does​ any one have any further insights here?




Mark McDonnell | BuzzFeed | Senior Software Engineer | @integralist
https://keybase.io/integralist 40 Argyll Street, 2nd Floor, London, W1F 7EB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20160915/64cdd13c/attachment.html>

More information about the nginx mailing list