CURL namelookup_time too high
When executing a simple CURL request it takes more than 10 seconds to process.
After looking at the CURL info, found out that namelookup_time is taking too long.
Server Configuration:
PHP 7.3
CURL 7.70.0
Any help would be appreciated.
-
Do other resolution requests take a considerable amount of time on the server? I doubt it'd be something related to curl but rather related to some configuration on the server. What's set in /etc/resolv.conf for the resolvers? 0 -
Dear @cPanelLauren, You are right, the issue was related to resolv.conf file. There are 3 IP addresses in this file and the last entry was resolving to internal Nameserver. So I tried moving last IP on the top and it worked. But I am still not sure about the other 2 IPs, and why they are not working. Regards. 0 -
There could be a lot of reasons but I wouldn't be able to tell you without knowing the IP's. You can test with google's Public DNS resolvers or CloudFlare's 0 -
Three IPs in the resolver configuration is as follow: Primary 10.255.250.40 Secondary 10.255.250.11 Tertiary 10.255.251.11 Intially primary IP was set as tertiary which caused long nameserver lookups. After making it primary the issue got resolved. But I am still not sure about the other two IPs (secondary, tertiary) and why they are not working. I didn't made any configuration changes in the server which could have changed the IPs. I believe these are default settings. 0 -
These are all internal IP's most likely set all automatically by your provider or NetworkManager 0
Please sign in to leave a comment.
Comments
5 comments