Apache:Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting
Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting
首次完全用官方安装包搭建,没有考虑到大流量的问题,一上去发现Apache直接挂掉,反应极其慢。看到日志error.log中:
[warn] Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting
再看上面一句:
Starting 64 worker threads.
在httpd.conf中并没有设置线程数量,Apache默认开启了64个,看来是远远不够。于是上网一查,在httpd.conf加入以下内容:
<IfModule mpm_winnt_module>
ThreadsPerChild 512
MaxRequestsPerChild 0
</IfModule>
这样开启了512工作线程。这个值根据需要可能要慢慢调整
重启Apache,运行正常,日志里没有再出现[warn],反应也非常快啰
————————————————
版权声明:本文为CSDN博主「yongrong」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/yongrong/article/details/6548866

浙公网安备 33010602011771号
