Maintained by: NLnet Labs

[Unbound-users] Timeout control

W.C.A. Wijngaards
Tue Nov 30 16:30:53 CET 2010

Hash: SHA1

Hi Vitalie,

The timeouts depend on the exact roundtrip times as observed, and the
nameservers for the domain.  If you want to have a timeout in your
software in case the resolution takes a long time, perhaps you want to
use alarm(2) or another timeout mechanism (e.g. from libevent).

Such as, use select(2) on the ub_fd() with the timeout of your choice.
You can use ub_cancel() to tell libunbound that the result of this query
is no longer needed.

Best regards,

On 11/26/2010 03:48 PM, Vitalie Cherpec wrote:
> Example output:
> [vitalie at silver ~]$ time unbound-host -4
> <>
> Host <> not found: 2(SERVFAIL).
> Host <> not found: 2(SERVFAIL).
> Host <> not found: 2(SERVFAIL).
> real    19m17.427s
> user    0m0.011s
> sys     0m0.011s
> On Fri, Nov 26, 2010 at 4:21 PM, Vitalie Cherpec <vitalie at
> <mailto:vitalie at>> wrote:
>     Hi,
>       I'm trying to use asynchronous interface from unbound
>     (ub_resolve_async) and I do have a problem.
>     When running DNS queries which receive no response from the
>     nameservers (lame delegation),
>     it locks the program and keeps trying forever (iterator module).
>     Same thing happens running query
>     with unbound-host command.
>     I've studied the documentation, but I didn't find any information on
>     how should I
>     configure the timeouts. Do you have any clues ?
>     Regards,
>     Vitalie Cherpec
> _______________________________________________
> Unbound-users mailing list
> Unbound-users at

Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora -