I have an installation of CentOS 5.5 with Plesk 9.5.3 and al web site (about 350) running in FastCGI mode. My version of fcgi is this:
# rpm -qa | grep fcgi
psa-mod_fcgid-1.10-3
ruby-fcgi-0.8.7-200705221357
psa-fcgi-2.4.0-2
psa-mod-fcgid-configurator-1.0-14
PHP-CGI wrapper is this:
Code: Select all
# grep CGI_PHP_BIN /etc/psa/psa.conf
CGI_PHP_BIN /var/www/cgi-bin/cgi_wrapper/cgi_wrapper
Code: Select all
# cat /var/www/cgi-bin/cgi_wrapper/cgi_wrapper
#!/bin/sh
#
# Custom PHP FCGID wrapper for Plesk domains
#
domain=`fgrep -m 1 "$UID" /etc/passwd| awk -F\: '{print $6}' |awk -F"/" '{print $5}'`
PHPRC="/etc/php-ini.d/php-$domain.ini"
[ -f ${PHPRC} ] || PHPRC="/etc/php.ini"
export PHPRC
PHP_FCGI_CHILDREN=0
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=1000
export PHP_FCGI_MAX_REQUESTS
exec /usr/bin/php-cgi
Code: Select all
# cat /etc/httpd/conf.d/fcgid.conf
# added by psa-mod-fcgid-configurator
LoadModule fcgid_module /usr/lib64/httpd/modules/mod_fcgid.so
<IfModule mod_fcgid.c>
SocketPath /var/lib/httpd/fcgid/sock
</IfModule>
# added by psa-mod-fcgid-configurator
<IfModule mod_fcgid.c>
IdleTimeout 3600
ProcessLifeTime 7200
MaxProcessCount 384
DefaultMaxClassProcessCount 12
IPCConnectTimeout 30
IPCCommTimeout 45
DefaultInitEnv RAILS_ENV production
</IfModule>
Code: Select all
[Thu Feb 03 16:21:58 2011] [notice] mod_fcgid: too much /home/httpd/vhosts/xxxxxxxxxxx/httpdocs/wp-content/plugins/share-this/share-this.php process(current:12, max:12), skip the spawn request
Can I optimize the configuration?
Thanks