一、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>