<div dir="ltr"><div class="gmail_default" style="font-size:small">Hello,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">We have an upstream that we know is serving a 500 error.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">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.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">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.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I'm not sure why that is for two reasons:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><ol><li>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)<br><br></li><li>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"<br></li></ol></div><div><div class="gmail_default" style="font-size:small">​Does​ any one have any further insights here?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">M.</div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><span><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;font-family:arial;color:rgb(0,0,0);font-weight:700;vertical-align:baseline;white-space:pre-wrap"><img src="https://lh4.googleusercontent.com/xeSMFkOaZOHS4-E_D7Svn2Kj6L4Qh2blV33q977ZZy0QDmzZrYvLSqKOXX8W9DrTjLvn58gQc605bOrG97GwEU779M0ON9niZMnKmYg8cjKMgBZ780xisYnr6fUA1JRa7hQJfCyr" width="48" height="48" style="border: none;"></span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;font-family:arial;color:rgb(0,0,0);font-weight:700;vertical-align:baseline;white-space:pre-wrap">Mark McDonnell</span><span style="font-size:13.3333px;font-family:arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap"> | </span><span style="font-size:13.3333px;font-family:arial;color:rgb(255,2,21);font-weight:700;vertical-align:baseline;white-space:pre-wrap">BuzzFeed </span><span style="font-size:13.3333px;font-family:arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap">| Senior Software Engineer | </span><span style="font-size:13.3333px;font-family:arial;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><a href="https://twitter.com/integralist" target="_blank"><font color="#666666">@integralist</font></a></span></p><span style="vertical-align:baseline"><font face="Arial"><span style="font-size:13.3333px;white-space:pre-wrap"><a href="https://keybase.io/integralist" target="_blank"><font color="#666666">https://keybase.io/integralist</font></a>
40 Argyll Street, 2nd Floor, London, W1F 7EB</span></font></span></span><br></div></div>
</div>