[OpenSIPS-Users] DNS timeout for enum_query?
R.P. Aditya
aditya at grot.org
Thu Jul 4 03:14:00 CEST 2013
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
More information about the Users
mailing list