Received: (from majordom@localhost) by hyperreal.org (8.8.5/8.8.5) id SAA08766; Fri, 3 Oct 1997 18:36:40 -0700 (PDT) Received: from twinlark.arctic.org (twinlark.arctic.org [204.62.130.91]) by hyperreal.org (8.8.5/8.8.5) with SMTP id SAA08762 for ; Fri, 3 Oct 1997 18:36:37 -0700 (PDT) Received: (qmail 25984 invoked by uid 500); 4 Oct 1997 01:36:56 -0000 Date: Fri, 3 Oct 1997 18:36:56 -0700 (PDT) From: Dean Gaudet To: new-httpd@apache.org Subject: [PATCH] reclaim_child_processes (was Re: Proxy bug?) In-Reply-To: <9710021501.aa01123@paris.ics.uci.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org Status: O X-Status: 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;