Plesk with mod_fcgid: httpd slows

Community support for Plesk, CPanel, WebMin and others with insight from two of the founders of Plesk. Ask for help here! No question is too simple or complicated. :-)
alessice
New Forum User
New Forum User
Posts: 4
Joined: Wed Sep 24, 2008 6:21 am

Plesk with mod_fcgid: httpd slows

Unread post by alessice »

Hi,

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
and configuration of mod_fcgi is:

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>
The problem is that httpd is very slow, load is persistant high and in error_log I have many error of fcgid:

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
it seems that the php-cgi processes should always be growing and never decreasing, so I have to restart httpd every hour.

Can I optimize the configuration?
Thanks
AntiochInteractive
Forum User
Forum User
Posts: 35
Joined: Thu Jan 08, 2009 4:31 am
Location: Fort Worth, TX
Contact:

Re: Plesk with mod_fcgid: httpd slows

Unread post by AntiochInteractive »

Stop using it. Use ruid2 to get past permissions issues and run PHP as Apache.

This might be 'workaround advice' - but I ran into this issue, I see other people running into this issue - or having trouble identifying this issue and all signs point to this -- yet I have yet to find a definitive statement from Parallels about FastCGI.
User avatar
mikeshinn
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 4155
Joined: Thu Feb 07, 2008 7:49 pm
Location: Chantilly, VA

Re: Plesk with mod_fcgid: httpd slows

Unread post by mikeshinn »

Interesting, I just had a report from a customer that seems to be the same thing... hmmm, just out of curiousity what version of Plesk are you both using?
Post Reply