Very slow Apache on Windows 7 Very slow Apache on Windows 7 apache apache

Very slow Apache on Windows 7


It's commonly suggested that this problem is caused by your firewall interfering or by having IPv6 enabled at your network interfaces, however those solutions didn't fix the issue for me. It turns out that by default Windows 7 hosts file at "C:\Windows\System32\drivers\etc\hosts" has this line commented out:

# 127.0.0.1 localhost

In my case, simply uncommenting this line changed the localhost performance back to what it was supposed to be, instead of that annoying 3-5 second wait on every page load. Remember that you need to run your text editor with administrator rights to edit the hosts file.


I had the same issue. Modifying the host file did not improve pages loading speed. After searching for hours, I finally found a solution.

I changed my httpd.conf file so that the listen address is bound to one IP address instead of all available interfaces :

#Listen 80Listen 127.0.0.1:80

Now all the webpages are loading instantaneously instead of ~10 seconds.

Hope this help.

Edit : actually it did not solve the issue, it was still randomly slow. I have to admit that I finally moved my webserver to a linux virtual machine on which I never observed any slow response time anymore.


I´m using Laravel Framework, what worked for me was changing directive realpath_cache_size = 1M in the php.ini. It changed loading time from 3 seconds to half second!

realpath_cache_size = 1M