This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Fwd: Increasing resolver timeout
- From: Alberto Salvia Novella <es20490446e at gmail dot com>
- To: glibc developers <libc-alpha at sourceware dot org>
- Date: Fri, 8 Nov 2019 18:20:48 +0100
- Subject: Fwd: Increasing resolver timeout
- References: <d61fa44c-05a9-aa88-aeb6-07735d582330@gmail.com>
For example we have the following bug:
$ time ping -c1 "google.com""
0% packet loss
0m5,064s
$ time (ip=$(getent ahostsv4 "google.es" | awk '{ print $1 }' |
head -n1); ping -c1 "${ip}")
0% packet loss
0m0,042s
The extra time on the first case it's caused by a router mistakenly not
returning the IPv6 DNS reply, so the command just sits till it timeouts.
The point is this, the bug has been there for a long time unnoticed
simply because with 5s timeout the delay simply felt within normal. It
wasn't till I started programing server stuff where I noticed that
retrieving the data just took so long.
So probably we would be better having a longer timeout, like about 10s.
So if there is any network anomaly it would be obvious to any person
operating it.
Alberto <https://es20490446e.wordpress.com>