Bug 47635 - Connections in Keep-Alive state keep accepting new requests after a graceful restart
Summary: Connections in Keep-Alive state keep accepting new requests after a graceful ...
Status: RESOLVED DUPLICATE of bug 41743
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mpm_prefork (show other bugs)
Version: 2.2.12
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2009-08-04 04:09 UTC by Sagi Bashari
Modified: 2014-01-19 19:10 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Sagi Bashari 2009-08-04 04:09:33 UTC
I am using Apache 2.2.12 with the prefork MPM on Linux.

I am trying to send a graceful restart signal to the apply configuration changes without affecting currently processed requests. This works, but I found that the old configuration is still being applied on some new requests for some time after the graceful restart. After investigation, I found that the new requests are made on connections that were opened before the graceful restart was issued, and were kept alive.

It looks like after sending the graceful restart signal, a process that finishes handling the current request honors the client keep-alive request and lets him send more requests over the same connection. I believe that a better behavior would be to close the current connection as soon as it finishes handling the current request (as if MaxKeepAliveRequests was reached).

I took a look in the trunk source code and I think that the code in http_protocol.c attempts to do just that by not letting a connection to remain persistent if mpm_state == AP_MPMQ_STOPPING. However, it looks like the prefork MPM does not update the mpm_state of the child process after receiving a graceful restart signal, so maybe that's what should be fixed.
Comment 1 Eric Covener 2014-01-19 19:10:58 UTC

*** This bug has been marked as a duplicate of bug 41743 ***