Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting的解决方法

服务器安装了wampserver以后,运行类似于微信上墙或者大型投票服务的时候经常会卡死,或者就停止工作了。翻开自己的apache错误日志,就找到了以下内容的提示:

Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting
Parent: Received shutdown signal -- Shutting down the server.

Child: All worker threads have exited.

根本原因是:wampserver默认的进程数为64,所以我们需要对它进行扩大,也就是说得在httpd.conf里面加上下面的几行代码,然后重启apache服务就OK啦!前提是设置的这个值需要和你的服务器硬件配置相关。



ThreadsPerChild 512 
MaxRequestsPerChild 0

你可能感兴趣的:(wampserver)