0

I have the following problem with mod_fcgid on apache with php.

Everything runs without any errors but all my requests are processed by one php interpreter, even when I set PHP_FCGI_CHILDREN>1 and there are multiple php interpreters. FcgidMinProccessPerClass also does nothing.

I discovered this using a sleep call into a test script.

Here is my config:

/usr/local/cpanel/cgi-sys/php5

exec /usr/bin/php

/home/usercp/public_html/cgi-bin/php.fcgi

#!/bin/sh
export PHPRC="/home/usercp/public_html/php.ini"
export PHP_FCGI_CHILDREN=2
export PHP_FCGI_MAX_REQUESTS=10
exec /usr/local/cpanel/cgi-sys/php5

/etc/httpd/conf/php.conf

# Fastcgi configuration for PHP5
LoadModule fcgid_module modules/mod_fcgid.so
FcgidMaxRequestsPerProcess 500
FcgidMinProcessesPerClass 1
FcgidMaxProcessesPerClass 10

FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php5
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php4
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php3
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php2
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .phtml

/usr/local/apache/conf/userdata/std/2/usercp/vhost/fcgi.conf

<Location />
AddHandler fcgid-script .php
Options +ExecCGI
FcgidWrapper /home/usercp/public_html/cgi-bin/php.fcgi .php

# Customize the next two directives for your requirements.
Order allow,deny
Allow from all
</Location>
2
  • How do you know all the requests are processed by one PHP interpreter?
    – quanta
    Aug 21, 2012 at 10:49
  • i request a test.php with a sleep(10) two times and then a phpinfo page , the first last 10 sec , the second 20 and the third 21
    – maazza
    Aug 21, 2012 at 10:53

1 Answer 1

0

OK , config was OK , it was just firefox that queued the requests :D no problem using wget and safari

switched to mod_fastcgi Apache mod_fastcgi

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.