httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject [PATCH] reclaim_child_processes (was Re: Proxy bug?)
Date Sat, 04 Oct 1997 01:36:56 GMT


On Thu, 2 Oct 1997, Roy T. Fielding wrote:

> >> I don't think it's a fatal problem -- I think the code is just a bit
> >> impatient at declaring them tardy.  Specifically on TERM, it does a
> >> killpg(SIGTERM), then calls reclaim_child_processes(2).  Then it waits a
> >> whopping 4096us before declaring them tardy.  Given that solaris has a
> >> hard time context switching 4ms isn't enough time.
> >
> >I think this time needs to be tuned now that actual processing can be done
> >during the shutdown; several seconds would even be reasonable.  Having it
> >too high won't hurt anything too much other than leaving the server dead
> >for a few seconds.  That code shouldn't be called during "normal" 
> >operation anyway, so... 
> >
> >Hmm, Roy... are you using any modules that do child exit stuff?
> 
> I was testing the default Configure + mod_status + mod_info + libproxy.a
> on an UltraSPARC 1.  It shouldn't be logging any error messages until
> a couple seconds have lapsed.
>
> Sorry I can't track it down myself --- I'm getting piled higher and deeper
> at the moment.

There's nothing to track down ... it's just because the
reclaim_child_processes() code is too sensitive probably because of how I
rearranged it.  I think this below is far more reasonable a delay before
declaring children too slow to exit.

Dean

Index: main/http_main.c
===================================================================
RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
retrieving revision 1.228
diff -u -r1.228 http_main.c
--- http_main.c	1997/10/02 05:25:03	1.228
+++ http_main.c	1997/10/04 01:32:44
@@ -1716,7 +1716,7 @@
 {
 #ifndef MULTITHREAD
     int i, status;
-    long int waittime = 4096;	/* in usecs */
+    long int waittime = 500000;	/* in usecs */
     struct timeval tv;
     int waitret, tries;
     int not_dead_yet;


Mime
View raw message