apache错误:mod_fcgid:can';t为应用进程槽


apache error: mod_fcgid: can't apply process slot for

我有Debian 6、Apache 2.2.16、php 5.3.7的服务器。Whereon运行两个页面——第一个是.net,访问用户多,第二个是.net——访问页面少。当重新启动apache2时,运行两个页面都可以,但几分钟/小时后无法加载pagesecond.net。在/log/apache2/second.net/error为:

mod_fcgid: can't apply process slot for /var/www/webuser/php5-wrap

在log/log/apache2/first.net中,它当然是但更少(考虑到用户数量)。什么时候出错?怎么了?

cat/var/www/webuser/php5-wrap

#!/bin/sh
PHP_FCGI_CHILDREN=1
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
exec /usr/bin/php5-cgi[/CODE]

cat/etc/apache2/mods enabled/fcgid.conf

<IfModule mod_fcgid.c>
AddHandler    fcgid-script .fcgi
FcgidConnectTimeout 45
IPCConnectTimeout 100
MaxRequestsPerProcess 1000
MaxProcessCount 2
DefaultMinClassProcessCount 0
FcgidMaxRequestsPerProcess 0
</IfModule>

很可能只是处理请求的进程用完了。您可能想要增加MaxClients和/或MaxSpareServer。

查看这些文章了解更多信息:

Apache MaxSpareServers

Apache MaxClients

希望能有所帮助。