Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting


最近每天半夜,服務器都會出現崩掉的現象,pc  app 都不能正常使用

查看錯誤日志發現問題所在:

[Wed Nov 09 08:07:28.651642 2016] [mpm_winnt:error] [pid 4256:tid 2692] AH00326: Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting
Starting the Apache2a service
The Apache2a service is running.
 

根本原因是:wampserver或者phpstudy 的apache默認的進程數為64,所以我們需要對它進行擴大

               百度看了一些文章得出解決方法.

               在conf/httpd.conf里面加上下面的幾行代碼,然后重啟apache服務就OK啦!這樣開啟了512工作線程,前提是設置的這個值需要和你的服務器硬件配置相關。

<IfModule mpm_winnt_module>
ThreadsPerChild 512 
MaxRequestsPerChild 0
</IfModule>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM