On Thu, Dec 15, 2016 at 10:32 PM, <j...@apache.org> wrote: > Author: jim > Date: Thu Dec 15 21:32:50 2016 > New Revision: 1774525 > > URL: http://svn.apache.org/viewvc?rev=1774525&view=rev > Log: > kill the keepalive conns as early as possible during graceful > process exit. > > Modified: > httpd/httpd/trunk/server/mpm/event/event.c > > Modified: httpd/httpd/trunk/server/mpm/event/event.c > URL: > http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/event.c?rev=1774525&r1=1774524&r2=1774525&view=diff > ============================================================================== > --- httpd/httpd/trunk/server/mpm/event/event.c (original) > +++ httpd/httpd/trunk/server/mpm/event/event.c Thu Dec 15 21:32:50 2016 > @@ -1865,6 +1865,7 @@ static void * APR_THREAD_FUNC listener_t > if (terminate_mode == ST_UNGRACEFUL > || apr_atomic_read32(&connection_count) == 0) > break; > + process_keepalive_queue(0); /* kill'em all early \m/ */
We need locking here (timeout_mutex). Also on current 2.4.x process_keepalive_queue() does not exist, so for an eventual backport it would be: + process_timeout_queue(keepalive_q, 0, + start_lingering_close_nonblocking); > } But as said there, I don't think it's necessary (and locking may be an overhead while waiting for active conns to terminate, dunno).