[OpenSIPS-Users] DNS timeout for enum_query?

Răzvan Crainea razvan at opensips.org
Thu Jul 4 15:45:41 CEST 2013


Hi, Adi!

I think you are confusing some notions. The 'execdnsthreshold' you are 
looking at is used to debug how long a DNS query takes, and in case it 
exceeds a certain threshold, log an error. By default it is disabled 
(not infinite), and you can tune it in your config file[1].
Regarding the ENUM resolver, OpenSIPS uses the operating system DNS 
stack. Therefore, by default, it uses the global DNS parameters (like 
timeout, retries, etc.). However, some of these parameters can be tuned 
from OpenSIPS script. I think that 'dns_retr_time'[2] and 'dns_retr_no' 
are some of the parameters you are looking to tune.

[1] http://www.opensips.org/Documentation/Script-CoreParameters#toc50
[2] http://www.opensips.org/Documentation/Script-CoreParameters#toc42

Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 07/04/2013 03:14 AM, R.P. Aditya wrote:
> We are having a problem with Enum queries hanging or taking too long to
> fail. By the time the query fails, the client has given up because it
> thinks kamailio/opensips is not responding rather than getting a
> meaningful error message after a reasonable DNS timeout. Currently the
> timeout seems to be set to be infinite and so the entire transaction
> blocks.
>
> Is there a way to wrap the enum_query() call in a timer?
>
> Otherwise it looks like a compile time default has to be changed -- In
> the Enum module, the enum_query does a DNS lookup using:
>
>    get_record()
>
> from resolve.c:
>
>    https://github.com/OpenSIPS/opensips/blob/fc287782b8c90291fa5aa93b06698db22c93d0d4/resolve.c#L1095
>
> get_record has a timeout, execdnsthreshold, but that is compiled in by
> default to be infinitely long:
>
>    https://github.com/OpenSIPS/opensips/blob/730e86d62face003ba41d2d3f1b44855478a40aa/main.c#L219
>
>    /* debugging in case dns takes too long. disabled by default */
>    int execdnsthreshold = 0;
>
> It would be good if that value was exposed as a config parameter.
>
> Thanks,
> Adi
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



More information about the Users mailing list