A-A+
如何增加APACHE连接数,解决APACHE不能访问
最近发现居然自己都连不上网站,查看了Apache的error.log,发现了很多下面信息:
Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting
网上查询一把,最近流量突然增长,服务器从昨天开始会中断一会,重新启动或者过几分钟才能正常访问。经查看APACHE运行状态,发现有以下提示。
64 requests currently being processed, 0 idle workers
再看APACHE错误日志,有如下提示:
Server ran out of threads to serve requests Consider raising the ThreadsPerChild setting
2、解决办法在httpd.conf里加入以下代码
<IfModule mpm_winnt_module>
#更改下面数量以适合需要
ThreadsPerChild 512
MaxRequestsPerChild 0
</IfModule>