8000 Supply max_fails=0 on all server entries by wlonkly · Pull Request #1496 · nginx-proxy/nginx-proxy · GitHub
[go: up one dir, main page]

Skip to content

Supply max_fails=0 on all server entries #1496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

wlonkly
Copy link
@wlonkly wlonkly commented Aug 30, 2020

If nginx-proxy is run on a host whose docker config has multiple
networks, then it will generate an additional

server XXX down;

entry in each upstream for networks on which the container isn't.
Having more than one server entry in an upstream invokes nginx's
max_fails/fail_timeout behavior, which will mark the only live
upstream server as down for 10s if it returns ONE error response.

Instead, we want nginx to keep retrying the live upstream server
regardless of what it returns, since there's nothing else to try.
Passing "max_fails=0" on each live server entry disables the
max_fails/fail_timeout behavior.

Fixes #1495.

AndreasSko added a commit to AndreasSko/infrastructure that referenced this pull request Sep 3, 2020
AndreasSko added a commit to AndreasSko/infrastructure that referenced this pull request Sep 3, 2020
AndreasSko added a commit to AndreasSko/infrastructure that referenced this pull request Sep 3, 2020
AndreasSko added a commit to AndreasSko/infrastructure that referenced this pull request Sep 3, 2020
AndreasSko added a commit to AndreasSko/infrastructure that referenced this pull request Sep 3, 2020
@buchdag buchdag self-assigned this Apr 29, 2021
@buchdag buchdag added the type/fix PR for a bug fix label Apr 29, 2021
wlonkly and others added 2 commits June 9, 2021 09:24
If nginx-proxy is run on a host whose docker config has multiple
networks, then it will generate an additional

  server XXX down;

entry in each upstream for networks on which the container _isn't_.
Having more than one server entry in an upstream invokes nginx's
max_fails/fail_timeout behavior, which will mark the only live
upstream server as down for 10s if it returns ONE error response.

Instead, we want nginx to keep retrying the live upstream server
regardless of what it returns, since there's nothing else to try.
Passing "max_fails=0" on each live server entry disables the
max_fails/fail_timeout behavior.
@buchdag
Copy link
Member
buchdag commented Jun 20, 2021

@wlonkly thanks for the PR

@pini-gh went the other route you mentioned in the original issue (#1495) :

handle the case where there are no upstreams at all and only output a single down upstream in that case

So the original issue should be fixed by #1667

@buchdag buchdag closed this Jun 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/fix PR for a bug 4CB9 fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Including "down" server entries can lead to "no live upstreams while connecting to upstream"
2 participants
0