[FASTCGI] Kill fastcgi process

Rob Lemley rclemley at booksys.com
Tue Jul 28 12:29:49 EDT 2009


Jean-Christophe Roux wrote:

> Date: Tue, 28 Jul 2009 04:32:55 -0700 (PDT)
> From: Jean-Christophe Roux <jcxxr at yahoo.com>
> Subject: Re: [FASTCGI] Kill fastcgi process
> To: Aron Szabo <aron at aron.ws>
> Cc: fastcgi-developers at mailman.fastcgi.com
> Message-ID: <395501.64461.qm at web35302.mail.mud.yahoo.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Aron,
>
> Thanks for your answer
>
>   
>> Kill -9 may be a bad idea ...
>> Read this: http://speculation.org/garrick/kill-9.html
>>     
> Thank you; I am going to take this into account
>   
If you need to use "kill -9" then something is broken and not working
correctly.  Indiscriminate use of "kill -9" is a fine way to hose your
system.  It should be used only as a last resort and is a strong
indication that something needs to be analyzed and fixed.
>   
>>> (2) Does it make a difference that the process is a static or a
>>>       
> dynamic one in order to make sure the older version of my app is
> completely removed?
>   
>> Normally no ...
>>     
> Once I have killed the running processes, what prevents the FastCgi Manager from spawning new processes which could be the older version of my program.  Isn't there a way to send a message straight to the  FastCgi Process Manager for Apache who would do the job (better than me most probably).
>   
If you're restarting the app to run the new version, then you should
ensure that the FastCgi process manager is unable to start the old version.

I'm not aware of a way to tell the FastCgi process manager to do that,
short of restarting apache.

> How do you guys handle that step of switching to a newer version of your app?
>   
Normally you install the old version, then restart the app.  On
Unix/Linux systems, you can remove files which are open by other
processes.  This is because you are removing only the directory entry,
not the file data and metadata.  The old version continues to run after
the old app is removed or replaced.  I believe the conventional FastCGI
strategy is to upgrade the app in place and immediately restart the app.

The DJB DaemonTools package can be useful for managing FastCGI External
Servers.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.pins.net/mailman/private.cgi/fastcgi-developers/attachments/20090728/2efab8e6/attachment.html>


More information about the FastCGI-developers mailing list