On Monday 26 January 2009, Zappasodi Daniele wrote:
I'm testing the proxy behaviour (Openser 1.3.2)
when DNS servers are
unreachable and I observe that with few requests that require the DNS, I
have the proxy completely blocked, while it could serve all the other
methods that don't need the DNS (method with IP adddress or incoming
REGISTERs). I observe that each child process remains suspended until all
DNS requests are finished (NAPTR, SRV and A). If I configure two DNS server
and X retransmissions after Y seconds, the child remain suspended for: 2 *
X * Y * 3 seconds (3=NAPTR+SRV+A queries)
Even if I set low values for X and Y (X=2 retr and Y=2 sec.) the child is
suspended for a long interval: 2*2*2*3=24 seconds.
Is it possible to avoid that chlidren remain suspended?
Hi Zappasodi,
the blocking is caused because the server tries to resolve the address
synchronously. So its not possible to avoid this blocking completely.
Is there any configuration param that can reduce this
interval?
Yes, take a look at the dns_retr_time and dns_retr_no parameter. But the
lowest timeout value possible (with glibc) is 1s, if one want to have a lower
timeout, the used resolver needs to be changed.
Another thing that is useful to avoid/ minimize blocking is the use of a local
DNS cache, which also caches failed resolve attempts.
Is it possibile to introduce a little change in
sip_resolvehost (check
errno) in order to avoid the SRV and A queries if the NAPTR fails because
the DNS servers are unreachable?
If you've a patch that improves the behaviour, just add it to our tracker [1].
In newer versions of the server the DNS implementation was also changed,
perhaps you can review if the problem is already fixed there.
Cheers,
Henning
[1]
https://sourceforge.net/tracker/?group_id=139143&atid=743022