FastCGI 'failed to remain running for 30 seconds' due to max_requests / & Why dynamic?

Michael <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
Hi,
  I have been attempting to test php/FastCGI that much more lately in higher
load situations closer to what we recieve.
  I am using PHP as the interpreter and notice that it exits after 500 requests
(no problem there) to clean up any leaked memory.  The problem that I am having
is that when I start up the apache server and benchmark a few thousand requests
that quickly can eat through those 500 connections.  While not a problem on its
own, mod_fastcgi seems to see it dying/respawning so quickly and puts a stop to
it (failed to keep running for 30 seconds).

I've tried using 'FastCgiConfig -restart-delay 5' to change this 30 seconds
without luck (it says dynamic application in the log).  I tried setting it on
my fastcgiserver line (which it seems to ignore for whatever reason?).  I've
tried setting it on the fastcgiconfig line, also with no luck.




So my question:
 1. how can I effectively change this to 10 seconds (for example) instead,
expecitng high volume but still using it to break applications.  Also, I'd like
the pausing delay to be a bit lower (or maybe allow 10 stop/restarts in that
time instead of only 3).  For me, stopping PHP for 10 minutes is really not
acceptable without being sure it's running away.
 2. Why does it say 'dynamic' despite this setup (requesting a .php file).  It
doesn't seem to sue the settings from FastCgiServer (in fact, commenting that
line changes nothing).  If I comment out my fastcgiserver line, the only thing
that changes is that it doesn't start up ONE php process as the web server, but
when I start up all of the others as the users, it does them all dynamically.

Any thoughts?





My config looks like this:
FastCgiServer /var/www/cgi-sys/php -user httpd -group users -initial-env
PHP_FCGI_MAX_REQUESTS=2000 -restart-delay 5
FastCgiConfig -restart-delay 5 -initial-env PHP_FCGI_MAX_REQUESTS=1000
<Location /cgi-sys/php>
        SetHandler fastcgi-script
        Options ExecCGI
</Location>
AddHandler php-fastcgi .php
Action php-fastcgi /cgi-sys/php
AddType application/x-httpd-php .php

See the errors that are cropping up:


[Mon Nov 29 12:04:20 2004] [notice] FastCGI: wrapper mechanism enabled
/usr/local/apache2/bin/suexec)
[Mon Nov 29 12:04:20 2004] [notice] FastCGI: process manager initialized
[Mon Nov 29 12:04:20 2004] [warn] FastCGI: server "/var/www/cgi-sys/php" (uid
14, gid 100) started (pid 31665)
[Mon Nov 29 12:04:20 2004] [notice] Apache/2.0.52 (Unix) mod_fastcgi/2.4.2
configured -- resuming normal operations
[Mon Nov 29 12:04:30 2004] [warn] FastCGI: (dynamic) server
"/var/www/cgi-sys/php" (uid 1011, gid 100) started (pid 31688)
[Mon Nov 29 12:04:31 2004] [warn] FastCGI: (dynamic) server
"/var/www/cgi-sys/php" (pid 31688) terminated by calling exit with status '0'
[Mon Nov 29 12:04:33 2004] [info] server seems busy, (you may need to increase
StartServers, or Min/MaxSpareServers), spawning 8 children, there are 0 idle,
and 12 total children
[Mon Nov 29 12:04:34 2004] [info] server seems busy, (you may need to increase
StartServers, or Min/MaxSpareServers), spawning 16 children, there are 0 idle,
and 20 total children
[Mon Nov 29 12:04:35 2004] [warn] FastCGI: (dynamic) server
"/var/www/cgi-sys/php" (uid 1011, gid 100) restarted (pid 31720)
[Mon Nov 29 12:04:36 2004] [warn] FastCGI: (dynamic) server
"/var/www/cgi-sys/php" (pid 31720) terminated by calling exit with status '0'
[Mon Nov 29 12:04:40 2004] [warn] FastCGI: (dynamic) server
"/var/www/cgi-sys/php" (uid 1011, gid 100) restarted (pid 31724)
[Mon Nov 29 12:04:42 2004] [warn] FastCGI: (dynamic) server
"/var/www/cgi-sys/php" (pid 31724) terminated by calling exit with status '0'
[Mon Nov 29 12:04:45 2004] [warn] FastCGI: (dynamic) server
"/var/www/cgi-sys/php" (uid 1011, gid 100) restarted (pid 31729)
[Mon Nov 29 12:04:46 2004] [warn] FastCGI: (dynamic) server
"/var/www/cgi-sys/php" (pid 31729) terminated by calling exit with status '0'
[Mon Nov 29 12:04:46 2004] [warn] FastCGI: (dynamic) server
"/var/www/cgi-sys/php" has failed to remain running for 30 seconds given 3
attempts, its restart interval has been backed off to 600 seconds
[Mon Nov 29 12:04:47 2004] [warn] FastCGI: (dynamic) server
"/var/www/cgi-sys/php" has failed to remain running for 30 seconds given 3
attempts, its restart interval has been backed off to 600 seconds

___________________________________
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.