Re: A couple of questions on apache-fastCGI

Mark Brown (
Thu, 08 Aug 1996 16:31:57 -0400

Message-Id: <>
Subject: Re: A couple of questions on apache-fastCGI
In-Reply-To: <>
Date: Thu, 08 Aug 1996 16:31:57 -0400
From: Mark Brown <>

Michael Smith asks:

    Can I restart a fastCGI process without killing it?  I know the
    server automatically restarts if it's killed but this means any
    current connections will be terminated.  Is there a way to restart
    after the current connection has been completed.

This can be done with application logic.  The application decides it
needs to be restarted using whatever technique you like: count the
number of requests, poll for the existence of a file, handle a signal,

You'd call FCGI_FinishRequest near the end of your request loop,
then test for termination, then exit if that's the right
thing to do.  mod_fastcgi will then perform the restart.

    I'm finding it a bit difficult to know how many fastCGI processes
    to run.

For a discussion of tuning the number of processes, see

    I guess what I would like happen is that if a number of requests
    greater than the number of fastCGI processes need to be processed,
    then ordinary CGI will be used instead.

I don't think you'd really want this.  The effect would be to amplify
load spikes; a system running at full capacity would thrash.

Some adaptive tuning of the process pool would be a nice feature to
add to mod_fastcgi, but would need to be approached carefully.

    Is this what happens when listen-queue-depth is exceeded?  If now
    that does this parameter do?

For a description of the listen queue, see the message
cited above,