Issued with Apache+mod_fastcgi+PHP

"Matt" <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Organization Successful Hosting
Message-ID <003701c64bb9$799293c0$c802a8c0@BLADESNITZ>
Hello,

I've got an issue that seems to be a result of how the process manager is
handling PHP applications.  For the most part, our setup is working quite
well, but there is at least one set of circumstances that is problematic.

Here's the setup:
FreeBSD6-amd64 on Dual 2.8GHz Xeon
Apache 1.3.34 + mod_ssl + suexec
mod_fastcgi-SNAP-0404142202
PHP 4.4.2 (Although I suspect the same behavior in PHP 5.1.2).

I've applied patches to PHP as listed here:
http://bugs.php.net/bug.php?id=34429
http://bugs.php.net/bug.php?id=36158

FastCgiConfig is as follows.  Note that PHP is run as a Dynamic process with
the Action method.

FastCgiConfig -flush -idle-timeout 120 -init-start-delay 1 -killInterval 120
-maxClassProcesses 100 -maxProcesses 100 -multiThreshold 50 -singleThreshold
50 -startDelay 3 -updateInterval 5 -pass-header HTTP_AUTHORIZATION

What occurs is that with certain (slow) scripts, PHP will continously spawn
every n seconds.  I believe I've correlated n to the -startDelay setting, so
if its set to 3, it spawns a PHP process every 3 seconds, if its 10, it
spawns one every 10 seconds.  In any case, the old processes are not killed
and you end up with x amount of processes running, to serve a single page
(and obviously one one of the procs is actually returning results).  I fear
that this behavior will result in a single page will consume the resources
alotted.

Any suggestions on how to workaround this situation, or am I missing some
inherit setting that may help to appease the situation?   I have
experimented with most of the settings above, but wasn't able to get
acceptable behavior. 

I've tested it on a server with 3 sites and a server with 300, and it
behaves the same in both.

Thanks,

Matt

___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.