Welcome! Log In Create A New Profile

Advanced

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

Mark McDonnell
September 15, 2016 09:58AM
Hello,

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?

Thanks.

M.

--

Mark McDonnell | BuzzFeed | Senior Software Engineer | @integralist
https://twitter.com/integralist
https://keybase.io/integralist 40 Argyll Street, 2nd Floor, London, W1F 7EB
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

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

Mark McDonnell September 15, 2016 09:58AM

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

Maxim Dounin September 15, 2016 01:52PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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