Recycling FastCGI processes
Rujith S. de Silva (desilva@ind70.industry.net)
Tue, 04 Jun 1996 08:32:34 -0400
Message-Id: <31B42CE2.167EB0E7@ind70.industry.net>
Date: Tue, 04 Jun 1996 08:32:34 -0400
From: "Rujith S. de Silva" <desilva@ind70.industry.net>
To: fcgi-developers@OpenMarket.com
Subject: Recycling FastCGI processes
For various reasons, such as a small memory leak, one might wish to have
a FastCGI process handle (say) a thousand requests, and then gracefully
exit, so that the server would restart it. Can this be done? Can this
be done in Perl? I tried:
while ($count < $num_hits && FCGI::accept >= 0)
{
handle_request ();
++$count;
}
exit (0);
But it seems that the LAST request handled before the exit gets munged.
In hindsight, this was to be expected. I tried messing with
FCGI::set_exit_status () to no avail.
So I guess my question is: how does one tell the FCGI libs that one has
finished processing the current request, but does NOT want to handle
another request?
Later,
Rujith.