You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"timeout:n
sets the amount of time the resolver will wait for a response from a remote name server before retrying the query via a different name server. Measured in seconds, the default is RES_TIMEOUT (currently 5, see <resolv.h>). The value for this option is silently capped to 30."
This indicates that after timeout seconds, the querier will move to the next server.
However, in Go 1.7, this seems to be a hard max timeout. The config structure is even noted as such -
"timeout time.Duration // wait before giving up on a query, including retries"
This in itself doesn't make much sense, since server iteration happens inside the retry for loop (which is correct).
Then in dnsclient_unix.go starting at 183, a hard deadline seems to add cfg.timeout to current time before even starting retries or iterations. Ideally instead this should be calculated and reset in the server for loop.
This is problematic because many set a low timeout in resolv.conf to keep a bad server from hanging for so long. Doing so now will cause queries to fail rather than move to next server as is supposed to happen.
Thanks
Alex A Skinner
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
1.7
What operating system and processor architecture are you using (go env)?
Linux amd64
The text was updated successfully, but these errors were encountered:
Yep, missed that sorry. We're getting production errors now and I'm sure others will too with the move to 1.7. This can be closed as dupe, but this behavior described in both tickets is unexpected and really should be remedied.
Per man resolv.conf -
"timeout:n
sets the amount of time the resolver will wait for a response from a remote name server before retrying the query via a different name server. Measured in seconds, the default is RES_TIMEOUT (currently 5, see <resolv.h>). The value for this option is silently capped to 30."
This indicates that after timeout seconds, the querier will move to the next server.
However, in Go 1.7, this seems to be a hard max timeout. The config structure is even noted as such -
"timeout time.Duration // wait before giving up on a query, including retries"
This in itself doesn't make much sense, since server iteration happens inside the retry for loop (which is correct).
Then in dnsclient_unix.go starting at 183, a hard deadline seems to add cfg.timeout to current time before even starting retries or iterations. Ideally instead this should be calculated and reset in the server for loop.
This is problematic because many set a low timeout in resolv.conf to keep a bad server from hanging for so long. Doing so now will cause queries to fail rather than move to next server as is supposed to happen.
Thanks
Alex A Skinner
Please answer these questions before submitting your issue. Thanks!
go version
)?1.7
go env
)?Linux amd64
The text was updated successfully, but these errors were encountered: