Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

dns_get_record takes too long

Discussion in 'Bind/DNS/Nameserver' started by thapame, Jul 27, 2013.

  1. thapame

    thapame Member

    Joined:
    Jul 6, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    51
    cPanel Access Level:
    Root Administrator
    Hi,

    I tried my best to find the issue, also contacted my vps provider if they have any network issues but nothing works.

    On one of my server I am using php built in function "dns_get_record" to get DNS records for passed hostname. But it taked more than 60 seconds to get the results whereas the same function takes 1-2 seconds on one of my another vps.

    Here is the configuration for the VPS:

    OS: CENTOS 5.9 x86_64
    cPanel/WHM: WHM 11.38.1 (build 15)
    Resolver on /etc/resolv.conf: 8.8.8.8 and 8.8.4.4
    Name Server: BIND
    PHP Version: Tried with both PHP 5.3.26 and 5.3.27
    Firewall: CSF v6.26 (also tried with disabling it)

    Can anyone suggest me what may be the issues or direct me so that it could help me find the issue and solve it.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    Have you tried using the "dig" or "host" commands on your system to see if you get the same delay that you do when using the "dns_get_record" function with PHP?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. thapame

    thapame Member

    Joined:
    Jul 6, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    51
    cPanel Access Level:
    Root Administrator
    There was some mis-configurations on '/etc/nameserverips' file and the issue is now fixed.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice