< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[sipX-dev] DNS query problem


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. 

Is there any other way to solve this problem? pls tell me.

Thank you all

tonyxiao
2007-4-13