在复杂的网络环境中,浏览器是百花齐放,各式各样。目前还有微信和QQ等内嵌浏览器,使用中我们的webserver会遇到不同的问题,今天就遇到了一个微信浏览器访问站点导致网站变慢以至apache挂起的情况,试验中我们也发现IE10浏览器也经常会导致同样的问题。
下面提供一个解决方法:
1、打开upupw\Apache2\conf\httpd.conf
2、查找
复制代码
#AcceptFilter http none
#AcceptFilter https none
3、修改为
复制代码
AcceptFilter http none
AcceptFilter https none
upupw默认添加了这个配置只是注释掉了,我们去掉#号,开启配置。
此处可以解决某些浏览器导致apache慢或者假死不响应的情况,提高兼容性。
4、查找
复制代码
ThreadsPerChild 1920
MaxConnectionsPerChild 100000
5、修改为
复制代码
ThreadsPerChild 500
MaxConnectionsPerChild 100000
此处主要是为了解决开启了AcceptFilter参数后如果ThreadsPerChild的值大于512会频繁重启apache的问题,ThreadsPerChild是apache工作进程的线程数最大值到1920超出后会报错,MaxConnectionsPerChild是工作进程最大处理多少请求后载入新的进程。
6、修改完后回upupw面板rr下。
备注:如果加了AcceptFilter https none不能使用ssl的情况重新注释为#AcceptFilter https none
原文:http://php.upupw.net/apache/6/1212.html
- 本文固定链接: https://www.fengshen.cn/2016/12/解决某些浏览器导致apache慢或假死问题/etcofwind/
- 转载请注明: fengshen 发表于 Dream of Wind | 一梦风神
