I am experiencing some odd behavior with apache. I have requests that are hanging for exactly two minutes. The request could be one file one time, and then a completely different file another time.

Here are a couple of screenshots of my network inspector.

ss #1 original URL: http://tiny-img.com/image.php?di=QNKO

ss #2 original URL: http://tiny-img.com/image.php?di=3BFS

ss #3 original URL: http://tiny-img.com/image.php?di=49VN

I'm not sure how to troubleshoot this, there are no errors in the logs, and I'm not finding anything referring to similar issues on the web.

Any ideas on how I can troubleshoot this, and/or if you know what is going on, I would appreciate any insight to what I can do to correct this.

  • Depending on how busy the webserver is you could restart httpd via a strace that follows spawned children (via -f) that would give you more of an indication of what it's trying to do when it hangs (including whether it's waiting on a locked resource to become available, or waiting on a network response). It's probably some sort of a high latency network resource or some sort of QoS control.
    – Bratchley
    Oct 2, 2013 at 0:50
  • Also, it looks like these are screencaps from Chrome's developer tools feature. You may try to enable nscd locally and see if that avoids this issue.
    – Bratchley
    Oct 2, 2013 at 1:02

1 Answer 1


Delays like this are often caused by reverse DNS lookups (i.e. resolving an IP address to a hostname).

Do you have HostNameLookups turned on in the apache config? If so, turn it off.

See also https://serverfault.com/questions/100225/apache-httpd-wont-stop-doing-reverse-dns-requests-for-clients-ips for other tips on disabling hostname resolution in apache.

  • 2
    Agreed. 2 minutes screams DNS issues. Oct 2, 2013 at 0:43
  • fwiw, it probably is DNS but it could be DNS on the client side as well, especially if the OP is on a weak WiFi connection or something like that. nscd is probably a good choice as well (even if only as a troubleshooting tool). Just thought I'd add that to the mix.
    – Bratchley
    Oct 2, 2013 at 2:42
  • true enough, but if it is client-side, there's not much you can do on the server to solve that.
    – cas
    Oct 2, 2013 at 5:02
  • No but it does let the OP know that he doesn't have anything to worry about and it's just that his test that's flawed.
    – Bratchley
    Oct 2, 2013 at 12:32
  • I have HostNameLookups turned off, so its not that, any other ideas? Oct 3, 2013 at 23:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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