libunbound: setting a deadline/timeout for ub_resolve

Alex Zorin ub-users at
Thu Jun 7 23:57:02 UTC 2018


I'm using libunbound to perform iterative DNS lookups for a diagnostic service: .

One of the problems I have is when one or more of a domain's authoritative nameservers are timing out, ub_resolve takes an incredibly long time to give up, something like ~10 minutes when the ub_ctx is configured with these options:

I've tried to grok the meaning of but I'm not seeing the solution after some weeks of pondering the problem..
Ideally I would like to place a deadline of something like 180 seconds on the ub_resolve operation. I am using a fresh ub_ctx for each lookup, which is done to avoid sharing any resolver state between lookups.

Do you have any further guidance on the ability to restrict ub_resolve's runtime?


More information about the Unbound-users mailing list