Yes for me I get attempts to 127.0.0.1 and ::1 as well

Setting tcp_timeout and udp_timeout changed nothing for me. Having a look in _udp_send the timeout used for can_read is made from the 'retrans' and 'retry' settings. Based on the default values (5 and 4) with the DNS timeout of 2.5s doubling, this results in a timeouts of: 2.5,2.5,5,5,10,10,20,20 for both servers (total 150 seconds).

This reduced the issue to 2.5 seconds:

Net::DNS::Resolver->tcp_timeout(1); Net::DNS::Resolver->udp_timeout(1);

But then I noticed that the local host name servers are in the defaults as well! So this 'fixes' it by setting the default nameservers to nothing:

Net::DNS::Resolver->nameserver4([]); Net::DNS::Resolver->nameserver6([]);

In reply to Re^4: Windows: AnyEvent -> HTTP -> DNS - > Blocking for minutes by sectokia
in thread Windows: AnyEvent -> HTTP -> DNS - > Blocking for minutes by sectokia

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.