up vote 0 down vote favorite
share [g+] share [fb]

I am using cURL to catch a remote server response. I've noticed that this method takes me 20 seconds eveytime. I've googled and found that something with the DNS lookup is misconfigured on my server (apache).

When i'm writing the exact i.p of the host it takes less than a second.

Any idea where to change this? I think it called reversed dns lookup but I can't figure out if I can enable/disable this.

Thanks

link|improve this question
feedback

2 Answers

up vote 0 down vote accepted

What's set in your /etc/resolv.conf file? Sounds like your DNS servers are slowing you down, so it's worth checking what your using.

I'd recommened OpenDNS unless you have specific local requirements. To try them just put in the /etc/resolv.conf file:

nameserver 208.67.222.222
nameserver 208.67.220.220
link|improve this answer
Beutiful ! it worked like magic. I think my server "dialed up" to mars before that change. Thanks again ! – user31279 Jan 25 '10 at 14:43
feedback

to disable reverse lookups, disbale HostnameLookup.

when this does not help, be sure to not use hostnames in RewriteRule, RewriteCond, deny/allow rules and %h in LogFormat.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.