-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slow DNS resolutioin #70
Comments
I've been unable to reproduce this more than just a few times. Hasn't happened since last week. I'll add more debugging just in case! |
Found the problem. ipv6 causes slowdowns when ipv6 is not available. Disabling ipv6 makes my test case twice as fast!
Usage:
|
This allows for disabling or re-enabling ipv6 at run-time depending on needs |
I have a different proposal, which a) reuses the already optionally exported CAN_IPV6 function to set the value (i.e. no different functions) and b) gets called as function not method, like all other subroutines in Utils. I did not test it yet, so please check if it works. |
Thanks, I will check. Also, I saw your old message (since deleted), about properly configured IPV6. In a perfect world: yes Example: sip.clearip.com. IN AAAA is empty result. Sometimes the query for AAAA takes 2-3 seconds waiting for a result we KNOW will be empty. So, why not skip it. |
Also... considering this is a long-running service processing many requests (we're making 2 SIP calls per second). We should cache DNS lookups. Can Net::SIP cache dns? Or maybe I should override the dns resolver and provide my own local-cache DNS? |
I have implemented DNS cache, so hopefully this should solve the rest of this for me. Now there's only one last issue to fix for our situation, which is when prio is missing -- #68 |
From the running system shell:
But, and not always, but randomly there will be a big delay (2-5 seconds)
Notice:
resolve_uri
1722959154.2142 to 1722959156.2161 = 2.0019 seconds
The text was updated successfully, but these errors were encountered: