Quote:
Could you share your whole worker config and how you setup fastcgi?
It isn't much.
Note that I don't consider myself an expert by any way, it simply works Good Enough For Me (tm). You will need to pay attention to your rewrite and/or redirect rules so /WhateverFakePath/ is exempted from them.
Code:
<IfModule mpm_worker_module>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
ThreadStackSize 2097152
</IfModule>
EDIT: Heh, seems that in the meantime these very values appeared in mpm_worker docs as an example.

Code:
FastCgiConfig \
-idle-timeout 120 \
-initial-env PHP_FCGI_CHILDREN=24 \
-initial-env PHP_FCGI_MAX_REQUESTS=500 \
-killInterval 100000 \
-listen-queue-depth 300 \
-maxClassProcesses 1 \
-singleThreshold 0
# You will need to pay attention to your rewrite
# and/or redirect rules so /WhateverFakePath/
# is exempted from them.
AddHandler php5-fastcgi .php
Action php5-fastcgi /WhateverFakePath/php-cgi
Alias /WhateverFakePath/php-cgi /usr/bin/php-cgi
<Location /WhateverFakePath/php-cgi>
Order Deny,Allow
Deny from All
Allow from env=REDIRECT_STATUS
Options ExecCGI
SetHandler fastcgi-script
</Location>
Works cool, except for one little PITA you can read about in
this thread - that is, a "graceful" Apache reload isn't so graceful, and kills all PHP scripts executing at that very moment sending HTTP 500 to users. With currently available FCGI handlers for Apache there's no workaround, unless one prefers using mod_fcgid and php in "dumb handler" mode without APC.