XAMPP / WAMP / whatever it is: Apache is running super slow [closed]

老子叫甜甜 提交于 2019-11-28 15:32:34
naitan

Here's a solution that really worked for me.

One thing to try is changing the following two entries in apache/conf/httpd.conf from OFF to ON:

EnableMMAP on
EnableSendfile on

Also, enable and set realpath_cache_size= 4m to your php.ini file.

If your are using InnoDB database also enable and set in my.ini:

innodb_flush_log_at_trx_commit = 2

Finally, it seems it worked for some people: edit your host (C:\Windows\System32\drivers\etc\hosts) by adding

127.0.0.1 localhost
127.0.0.1 127.0.0.1

And commenting:

\# ::1 localhost

Try to add this lines to hosts file:

127.0.0.1 127.0.0.1

127.0.0.1 localhost

and comment this line:

# ::1 localhost

You can find hosts file under: C:\Windows\System32\drivers\etc

Very slow is a very general problem, but it happened for me when I first installed IIS to run alongside apache, and also after I did a windows update (config was reset?)

Anyhow, what happened was that IIS started conflicting with Apache on port 443 (SSL) and so I had to use the follow command to disable SSL on IIS so that Apache would run fast again:

c:\inetpub\adminscripts\>adsutil set w3svc/1/securebindings "::"

Hope this helps.

edit: I also found that if I had ColdFusion installed and the service timed out during startup apache would run really slow. If you have ColdFusion installed, run services.msc and check to see if the main service is running. If that works, try adjusting your startup time ( http://www.ahphosting.net/support/Customer/KBArticle.aspx?articleid=23 ) so it will start automatically on the next reboot.

Oddly, the IP hosts/address change did the trick to me.

I'm on XP, and have had "127.0.0.1 localhost" in my hosts file forever.

Recently (maybe after some Windows updates, maybe after adding other application directories to my xampp htdocs, maybe after installing something else that conflicts with those ports?) pages - even simple HTML pages - started loading extremely slowly.

Merely commenting out the "127.0.0.1 localhost" line in my hosts file seems to have done the trick - now pages are loading consistently quickly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!