The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

dns_get_record takes too long

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

  1. thapame

    thapame Member

    Joined:
    Jul 6, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    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:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    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.
     
  3. thapame

    thapame Member

    Joined:
    Jul 6, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    There was some mis-configurations on '/etc/nameserverips' file and the issue is now fixed.
     
Loading...
Similar Threads - dns_get_record takes too
  1. EbyD
    Replies:
    3
    Views:
    184

Share This Page