httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: Flushing lingering CGI processes
Date Mon, 04 Apr 2005 17:00:16 GMT
Nick wrote:
> Hello
> Firstly, thank you to everyone who has contributed to the great apache 
> project.
> I understand that if a CGI process is launched then gets stuck, if the 
> CGI process keeps quiet, the apache server will not 'know' the http 
> connection has broken so will not 'know' to kill the CGI process. The 
> stuck CGI process and the accompanying apache process will then 
> needlessly use system resources indefinately.
> In a worst case scenario, the stuck CGI process will lock some server 
> resource possibly causing many other CGI processes to get stuck, 
> bringing the server down. (I attribute a recent crash to this).
> A great solution for administrators would be to set a timer. If the CGI 
> program hasn't given any output for the given time, the CGI process is 
> killed.

Nick, take a look at the perl module Apache::Watchdog::RunAway
which does exactly what you want and comes with a little daemon.

To operate it needs to be able to fetch the scoreboard, which can be done 
by either Apache::Scoreboard if you run mod_perl, or by a stand-alone C 
module mod_scoreboard_send.c. Both live here:

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

View raw message