Hi Wouter,<br>

<br>

I've followed your tips, now I'm controlling the timeout from libev using file descriptor returned by ub_fd().<br>

<br>

Thank you !<br>

<br>

Regards,<br>

Vitalie Cherpec<br><br><div class="gmail_quote">On Tue, Nov 30, 2010 at 5:30 PM, W.C.A. Wijngaards <span dir="ltr"><<a href="mailto:wouter@nlnetlabs.nl">wouter@nlnetlabs.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
Hi Vitalie,<br>
<br>
The timeouts depend on the exact roundtrip times as observed, and the<br>
nameservers for the domain.  If you want to have a timeout in your<br>
software in case the resolution takes a long time, perhaps you want to<br>
use alarm(2) or another timeout mechanism (e.g. from libevent).<br>
<br>
Such as, use select(2) on the ub_fd() with the timeout of your choice.<br>
You can use ub_cancel() to tell libunbound that the result of this query<br>
is no longer needed.<br>
<br>
Best regards,<br>
   Wouter<br>
<div class="im"><br>
On 11/26/2010 03:48 PM, Vitalie Cherpec wrote:<br>
> Example output:<br>
><br>
> [vitalie@silver ~]$ time unbound-host -4 <a href="http://www.example.com" target="_blank">www.example.com</a><br>
</div>> <<a href="http://www.example.com" target="_blank">http://www.example.com</a>><br>
> Host <a href="http://www.example.com" target="_blank">www.example.com</a> <<a href="http://www.example.com" target="_blank">http://www.example.com</a>> not found: 2(SERVFAIL).<br>
> Host <a href="http://www.example.com" target="_blank">www.example.com</a> <<a href="http://www.example.com" target="_blank">http://www.example.com</a>> not found: 2(SERVFAIL).<br>
> Host <a href="http://www.example.com" target="_blank">www.example.com</a> <<a href="http://www.example.com" target="_blank">http://www.example.com</a>> not found: 2(SERVFAIL).<br>
<div class="im">><br>
> real    19m17.427s<br>
> user    0m0.011s<br>
> sys     0m0.011s<br>
><br>
><br>
> On Fri, Nov 26, 2010 at 4:21 PM, Vitalie Cherpec <<a href="mailto:vitalie@penguin.ro">vitalie@penguin.ro</a><br>
</div><div class="im">> <mailto:<a href="mailto:vitalie@penguin.ro">vitalie@penguin.ro</a>>> wrote:<br>
><br>
>     Hi,<br>
><br>
>       I'm trying to use asynchronous interface from unbound<br>
>     (ub_resolve_async) and I do have a problem.<br>
>     When running DNS queries which receive no response from the<br>
>     nameservers (lame delegation),<br>
>     it locks the program and keeps trying forever (iterator module).<br>
>     Same thing happens running query<br>
>     with unbound-host command.<br>
><br>
>     I've studied the documentation, but I didn't find any information on<br>
>     how should I<br>
>     configure the timeouts. Do you have any clues ?<br>
><br>
><br>
>     Regards,<br>
>     Vitalie Cherpec<br>
><br>
><br>
><br>
><br>
><br>
</div>> _______________________________________________<br>
> Unbound-users mailing list<br>
> <a href="mailto:Unbound-users@unbound.net">Unbound-users@unbound.net</a><br>
> <a href="http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users" target="_blank">http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users</a><br>
<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.11 (GNU/Linux)<br>
Comment: Using GnuPG with Fedora - <a href="http://enigmail.mozdev.org/" target="_blank">http://enigmail.mozdev.org/</a><br>
<br>
iEUEARECAAYFAkz1GK0ACgkQkDLqNwOhpPhsmACXadp0UsO078iAWuKikv8S9Kqr<br>
zACfTKmoV25tCuMJtElHWUJkzcTaN7E=<br>
=KlZc<br>
-----END PGP SIGNATURE-----<br>
_______________________________________________<br>
Unbound-users mailing list<br>
<a href="mailto:Unbound-users@unbound.net">Unbound-users@unbound.net</a><br>
<a href="http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users" target="_blank">http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><a href="http://www.dnsvalidation.com" target="_blank">DNS Validation</a> - Free DNS Tests<br><br>