I use mod-fcgid 2.2 with Apache 2.2.9 (worker), and php 5.2.6 on a 
Debian Lenny 64bits.

My fcgid conf (for tests) :
    MaxProcessCount 32
    DefaultMaxClassProcessCount 4
    DefaultMinClassProcessCount 2

the PHP wrapper :

    export PHP_FCGI_CHILDREN=5
    export PHP_FCGI_MAX_REQUESTS=1000
    exec /usr/bin/php5-cgi $@

I reload Apache (apache2ctl graceful) then I access to the website, 
there is 6 php-cgi process : it seems ok since PHP do a fork() to 
maintain 5 children per "fcgid process". So this configuration should 
allow 20 (4 * 5) simultaneous php queries, no ?

So I run ab with only five concurrent users (-n 5000 and -c 5). And I 
obtain in my logs :
[Fri Feb 27 01:18:45 2009] [notice] mod_fcgid: too much 
/home/xxxx/http/v2/index.php process(current:4, max:4), skip the spawn 

The DefaultMaxClassProcessCount is reached, but why fcgid try have 
launched 4 process ? Just one or two should be sufficient in the case of 
five concurrent users, since each PHP process can handle 5 of them. No ?
Or maybe I misunderstood this fork feature of PHP, and FCGID can't use 
this children in parallel ? But in that case, what is the interest of 
this fork() ?

Thanks for any explanation,
Olivier B.

Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
Mod-fcgid-users mailing list

Reply via email to