[prev in list] [next in list] [prev in thread] [next in thread] 

List:       unbound-users
Subject:    libunbound:  setting a deadline/timeout for ub_resolve
From:       Alex Zorin via Unbound-users <unbound-users () unbound ! net>
Date:       2018-06-07 23:57:02
Message-ID: 1528415822.952749.1400394904.708461FB () webmail ! messagingengine ! com
[Download RAW message or body]

Hello,

I'm using libunbound to perform iterative DNS lookups for a diagnostic service: \
github.com/letsdebug/letsdebug .

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:

    https://github.com/letsdebug/letsdebug/blob/e56f10a5741445645c44a6d6683b9f085f657999/dns_util.go#L84-L116


I've tried to grok the meaning of \
https://www.unbound.net/documentation/info_timeout.html 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?

Thanks!
Alex


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic