Opened 7 years ago
Closed 6 years ago
#1511 closed defect (fixed)
multiple resolver would retry others when someone fails
Reported by: | Owned by: | Ruslan Ermilov | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | other | Version: | 1.13.x |
Keywords: | Cc: | ||
uname -a: | 2.6.32 | ||
nginx -V: | nginx version: nginx/1.12.2 built by gcc 4.8.2 (GCC) built with OpenSSL 1.0.2h 3 May 2016 TLS SNI support enabled |
Description
As mdounin mentioned, the resolver_timeout directive controls hard limit on the total DNS resolution time. If not answered, DNS queries are resent (to a different server if configured) each 5 seconds, see here:https://trac.nginx.org/nginx/browser/nginx/src/core/ngx_resolver.c#L197. There is no way to configure this timeout though, as this doesn't seem to be needed in most cases in practice.
To make sure DNS queries are resent to a different server if one the configured servers is down, consider using resolver_timeout set to something like 6s or more.
I set resolver_timeout to 10s, but when ngx_resolver_send_query fails, resolver do not retry, see here:https://trac.nginx.org/nginx/browser/nginx/src/core/ngx_resolver.c#L855, the code goto failed, return ERROR and clean events
Attachments (1)
Change History (7)
by , 7 years ago
follow-up: 3 comment:2 by , 7 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
Try the attached patch.
comment:4 by , 7 years ago
Could you please provide us with the exact use case that you faced with, including the relevant error_log messages and possibly the config snippet?
comment:6 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I set resolver_timeout to 10s, but when ngx_resolver_send_query fails, resolver do not retry, see here:https://trac.nginx.org/nginx/browser/nginx/src/core/ngx_resolver.c#L855, the code goto failed, return ERROR and clean events
So multiple resolver do not retry others when someone fails