Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Am having the strangest issue with an apache/PHP instance (PHP 5.2 in this case), where it will take over a minute to respond to a request. The PHP profiling is saying it's taking less than a second to actually generate the response, there just seems to be something in the way blocking. The browser network activity inspector doesn't give any clue either, as it's just saying the time to receive the first byte is 50-70 seconds. Any other suggestions to see what is causing the issue?

I'm debating wiping everything out and starting over, but would rather find out what the issue is since everything appears to be configured correctly, and I didn't do anything differently than normal. Thanks for any thoughts!

share|improve this question
Please clarify ... respond to a request, I assume you mean a HTTP request via a browser? What are you requesting? Does this happen if you request an image or other static content from the same server? Does this happen if you pull a simple php script such as phpinfo or hello world script? – jeffatrackaid Dec 6 '11 at 20:36
Curious of how it responds to requests for an .html page. – Tim Dec 6 '11 at 20:37
Digging into it a bit deeper, and it seems to only be happening for one virtual host. I've changed index.php to just a phpInfo(), and also tried accessing a .html page, and both are causing the issue. Also tried a couple different browsers to make sure this was not the problem. The virtual host is just a standard one, and once it takes a minute to load refreshes will be quick for about a minute (even with changes to the page so it's not a browser cache), then the delay comes back. – Brian Hogg Dec 6 '11 at 20:46
Actually it seems to be every virtual host just at different times, and still can't see what is causing the delay. Just not seeing a pattern to what part of the stack is causing the problem, très frustrating. – Brian Hogg Dec 6 '11 at 21:06
up vote 1 down vote accepted

Turns out it was an issue with /etc/hosts - for whatever reason OSX Lion 10.7.2 has issues with putting multiple domains on the same line, for example:


By putting them on the same line, pinging would take a minute to resolve, whereas would instantly resolve to There's discussions on various issues with DNS and the hosts file on OSX Lion such as:

If anyone knows why this particular problem is happening would be interested to know, but at least the problem is now solved!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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