Re: [sipX-dev] DNS query problem
On Fri, 2007-04-13 at 20:34 +0800, tonyxiao wrote:
> Hi all,here is a problem I met:
> Before forwarding the message, SIP server will perform a DNS query. In
> SipSrvLookup::servers(), the query step is: UDP SRV-->TCP SRV-->TLS
> SRV-->A.
>
> If any of the above step failed, it will try the next step,the worst
> thing is that all these steps failed, so the function will take over
> one minute to reach the end. During this minute, because the function
> is blocked, the server can not handle other messages. Such thing
> happened in my server, a invalid domain name can cause the server stop
> working for over one minute.
>
> The reason is DNS query may take a long time, and the server is using
> a blocking method to call this function. Does anyone met this problem?
> I think we should create a new thread to perform DNS query, store the
> results in cache, and the message processing thread should take this
> result directly.
It's been known as a theoretical problem for a long time, but DNS
failure isn't very frequent in production systems. I think you're the
first person to have run into this in practice.
Can you describe what caused this problem for you? Especially if it
allows one to re-create the problem at will.
If this happened to you in a production system, could you file a but
report on it in the SIPfoundry bug tracker?
Thanks,
Dale