一、AH00326: Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting
解決方法:
1、啓用MPM模塊配置文件
在Apace安裝目錄/conf/extra目錄中有一個名爲httpd-mpm.conf的配置文件。該文件主要用於進行MPM模塊的相關配置。不過,在默認情況下,Apache的MPM模塊配置文件並沒有啓用。因此,我們需要在httpd.conf文件中啓用該配置文件,如下所示:
# Server-pool management (MPM specific)
Include conf/extra/httpd-mpm.conf (去掉該行前面的註釋符號"#")
2、修改MPM模塊配置文件中的相關配置:修改http-mpm.conf文件
由於mpm_winnt模塊只會創建1個子進程,因此這裏對單個子進程的參數設置就相當於對整個Apache的參數設置。
<IfModule mpm_winnt_module>
ThreadsPerChild 500 #默認值是150,推薦設置:小型網站=1000 中型網站=1000~2000 大型網站=2000~3500
MaxRequestsPerChild 30000 #推薦設置:小=10000 中或大=20000~100000
</IfModule>
3、重啓apache
二、AH00358: Child: Process exiting because it reached MaxConnectionsPerChild. Signaling the parent to restart a new child process
解決方法:
修改http-mpm.conf文件,增大第一條http-mpm.conf文件中得MaxRequestsPerChild值。
極端情況下,無論MaxRequestsPerChild值增大到多少
三、mod_fcgid: can't apply process slot for C:/BtSoft/WebSoft/php/5.6/php-cgi.exe
解決方法:
打開apache\conf路徑下的httpd.conf文件,找到最下方的IfModule mod_fcgid.c
增加 FcgidMaxProcesses 限制值(最大可爲1200),然後重啓Apache。例如:
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi
FcgidIOTimeout 60
FcgidConnectTimeout 10
FcgidBusyScanInterval 120
FcgidBusyTimeout 300
FcgidErrorScanInterval 3
FcgidIdleScanInterval 120
FcgidIdleTimeout 300
FcgidProcessLifeTime 3600
FcgidZombieScanInterval 3
FcgidMaxProcesses 512
FcgidMaxProcessesPerClass 20
MaxRequestLen 52428800
</IfModule>