You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2012/12/21 00:22:43 UTC

[Bug 46963] KeepAliveTimout prevents child process from exiting cleanly with winnt_mpm

https://issues.apache.org/bugzilla/show_bug.cgi?id=46963

Steven Bush <sb...@accelrys.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sbush@accelrys.com

--- Comment #1 from Steven Bush <sb...@accelrys.com> ---
I just ran into this as well.  We have a custom module that has a hook into the
shutdown via apr_pool_cleanup_register().

If the KeepAliveTimeout is set to anything greater than 30 seconds (the
hardcoded "death to all children time" as mentioned in NG's comment), our
cleanup is never called and various resources fail to get cleaned up.

We're working around this through other means, but it seems that when the
server is shutting down, the child thread that is in a keep-alive state waiting
for a further request should close its socket and exit rather than waiting for
the end of the keep-alive timeout.  For one thing, any further requests by the
client will be ignored, so there doesn't appear to be a benefit to staying
open.

You can see the effect quite easily with a simple configuration:

1. httpd.conf with KeepAliveTimeout set to something > 30 seconds (say 60)
2. a Module with a cleanup hooked into apr_pool_cleanup_register()
3. start server
4. make a single keep-alive request to server-status (or any other resource)
5. shut down server
-->  you will find that the server takes ~30 seconds to shutdown and the
cleanup is never called

Repeat, but eliminate the connection in step 4:
--> process shuts down in ~2-5 seconds and clean up is called

Repeat, but this time reduce the KeepAliveTimeout to < 10 seconds (say 10)
--> process shuts down in ~5-15 seconds and clean up is called

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org