configuring / modifying request timeouts

Ian Jackson ijackson at
Fri Aug 12 22:11:28 BST 2016

Matthew Hall writes ("configuring / modifying request timeouts"):
> I am working on some code which needs to attempt to resolve a
> gigantic list of domains, many of which are going to be
> unresolveable. When troubleshooting and optimizing this I am finding
> that the adns code has a hard-coded amount of UDP retries and retry
> time.
> #define UDPMAXRETRIES 15
> #define UDPRETRYMS 2000
> After changing to 5 retries it can still cost 20 seconds, which is confusing 
> because I would have expected 10 seconds. Also, a whole ton of unit tests 
> start to fail if you reduce it.
> So I'm just trying to understand how to get it to work the best in
> these kinds of scenarios.

Are you submitting your queries in parallel ?

I guess it wouild be possible to provide some tuning knobs (in
resolv.conf) to adjust this.  For example, adns could honour
`attempts:'.  Currently it ignores it.

If you did that then the test suite would still pass, and you could
add new tests for your new confiuration.

You'd have to take a bit of care so that setting only one of timeout
or attempts does something sane, compared to the bind (libresolv)

Sorry I don't have time to implement this feature right now.

I don't know why it took 20 seconds for you.  Perhaps the query was
answered late with a truncated response, or you're doing reverse
lookups and the reverse lookup answer turned up late.


More information about the adns-discuss mailing list