httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dan kelley <dkel...@otec.com>
Subject RE: mod_cgi kills CGI subprocesses after 3 seconds
Date Tue, 29 Jan 2002 16:06:09 GMT
> > i'm having some difficulty with CGI subprocess being killed by apache
> > shortly after they close stdout.  we have some CGI programs that continue
> > to do background processing after they've finished returing data to the
> > client, so it would be beneficial to us to be able to change this
> > behavior.
>
> I'm not an expert in this area, but if you read the CGI FAQs, they will tell
> you that the correct way to do long-lived processing from a CGI is to fork a
> subprocess from your cgi script and make sure that the subprocesses closes
> stdin, stdout, and stderr.

ok, but there are several problems with this approach :

	1. the extra fork:  adds complexity to my CGIs, hurts performance
	2. i only need (on average) 2-3 seconds of CPU time for the extra
	   processing.

to explain the problem further:  all of these CGIs originally ran under
Netscape Enterprise;  the default behavior of NES was to let them run
forever, so we already have code in a CGI lib that sets a timeout to kill
runaway CGIs.  right now, we're prevented from using apache because
there's no clean way to stop apache from killing the CGIs once they close
stdout.

thanks-

dan


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message