I am working on a tiny little PHP project for a friend of mine, and I have a WAMP environment setup for local development. I remember the days when the response from my local Apache 2.2 was immediate. Alas, now that I got back from a long, long holiday, I find the responses from localhost painfully slow.
It takes around 5 seconds to get a 300B HTML page served out.
When I look at the task manager, the httpd processes (2) are using up 0% of the CPU and overall my computer is not under load (0-2% CPU usage).
Why is the latency so high? Is there any Apache setting that I could tweak to perhaps make its thread run with a higher priority or something? It seems like it's simply sleeping before it's serving out the response.
straceandtcpdumpare useful tools for this. – Ladadadada Nov 01 '12 at 12:20http://localhost/index.html)? If not, it might be a PHP issue, not an Apache issue. – Marcus Spiegel Sep 17 '09 at 17:52127.0.0.1: does it still work if you access127.0.0.2,127.1.2.3, and so on or does hard-coding127.0.0.1create an unnecessary restriction? – Synetech Nov 19 '13 at 21:26localhostresolving properly DNS-wise?ping localhostshould come back instantaneously with127.0.0.1. – Alexis Lê-Quôc Sep 17 '09 at 17:25http://hostname.localdomain/project/test.php? If so, which name servers do you have set on the box running Apache? Local name servers or the ones provided by the ISP? If you have two name servers at the box and the first one is down, Windows does not switch all the following requests to the second name server, it will always try to connect to the first name server, wait until it times out and then probe the second NS. Make sure that every name server you have specified is up and running. If not, are you using ` – kargig Sep 17 '09 at 18:07