Operating System & Version
Centos 7
cPanel & WHM Version
WHM 86.0.19

syedabdulbaqi

Member
Feb 29, 2020
6
2
3
India
cPanel Access Level
Root Administrator
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.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston
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?
 

syedabdulbaqi

Member
Feb 29, 2020
6
2
3
India
cPanel Access Level
Root Administrator
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.
 
  • Like
Reactions: cPanelLauren

syedabdulbaqi

Member
Feb 29, 2020
6
2
3
India
cPanel Access Level
Root Administrator
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.