Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#202 working with DNS server unreachable

ver devel
closed-accepted
core (30)
5
2009-02-19
2009-01-26
No

When a child process makes a DNS query it remains suspended until it receives the response from the DNS server, so with few DNS requests you can have all the children blocked, while they could serve the requests that don't need the DNS.
When all DNS servers are unreachable it waits for a long period: 3 (NAPTR+SRV+A) * [number of DNS servers * number of retransmissions * time to wait per each retransmission] seconds.
With this small patch, if the NAPTR request fails because the DNS server is unreachable the process doesn't try to make the SRV and the A queries . If all the configured DNS servers are unreachable, the delay becames: 1 (instead of 3, only NAPTR) * [numbers of DNS servers * number of retransmissions * time to wait per each retransmission] seconds.
It doesn't give any help to reduce the delay when at least one of the DNS server responds.

Discussion

  • patch to resolve.c

     
    Attachments
    • assigned_to: nobody --> henningw
    • status: open --> closed-accepted
     
  • Thank your for the patch, i applied it to trunk with some minor changes. I used the defined constant from errno.h instead of the magic number, and also changed the log message a big.