0
votes

I have server with Debian 6,Apache 2.2.16,php 5.3.7. Whereon runs two page first.net - many visit user, second.net - much less page visit. When restart apache2,that run both page ok, but after few minutes/hours cant load page second.net. In /log/apache2/second.net/error is:

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

In log /log/apache2/first.net is it certainly but less(given the number of user). When is error? What is wrong?

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>
1

1 Answers

3
votes

It's very likely that you are simply running out of processes to deal with requests. You probably want to increase your MaxClients and/or MaxSpareServers.

See these articles for more info:

Apache MaxSpareServers

Apache MaxClients

Hope it helps.