diff options
author | Graham Dumpleton <Graham.Dumpleton@gmail.com> | 2021-08-03 13:45:35 +1000 |
---|---|---|
committer | Graham Dumpleton <Graham.Dumpleton@gmail.com> | 2021-08-03 13:45:35 +1000 |
commit | 550bf8a7ab4914d11650627c4241076e8e2b2710 (patch) | |
tree | 4bceb6eb83a65038ea1b293c41ecd2883554ae1d | |
parent | df677946380e67579ca01798e78ac4fd12d6647e (diff) | |
download | mod_wsgi-550bf8a7ab4914d11650627c4241076e8e2b2710.tar.gz |
Was not exiting as soon as active requests complete.
-rw-r--r-- | docs/release-notes/version-4.9.0.rst | 6 | ||||
-rw-r--r-- | src/server/mod_wsgi.c | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/docs/release-notes/version-4.9.0.rst b/docs/release-notes/version-4.9.0.rst index a22ed8d..67a9d48 100644 --- a/docs/release-notes/version-4.9.0.rst +++ b/docs/release-notes/version-4.9.0.rst @@ -18,6 +18,12 @@ Bugs Fixed * When using CMMI (configure/make/make install) method for compiling mod_wsgi if embedded mode was being disabled at compile time, compilation would fail. +* When ``maximum-requests`` option was used with mod_wsgi daemon mode, and + a graceful restart signal was sent to the daemon process while there was + an active request, the process would only shutdown when the graceful + timeout period had expired, and not as soon as any active requests had + completed, if that had occurred before the graceful timeout had expired. + Features Changed ---------------- diff --git a/src/server/mod_wsgi.c b/src/server/mod_wsgi.c index dcaa74c..efbf236 100644 --- a/src/server/mod_wsgi.c +++ b/src/server/mod_wsgi.c @@ -9087,7 +9087,10 @@ static void wsgi_daemon_worker(apr_pool_t *p, WSGIDaemonThread *thread) } } } - else if (wsgi_daemon_graceful && !wsgi_daemon_shutdown) { + + /* Check if graceful shutdown and no active requests. */ + + if (wsgi_daemon_graceful && !wsgi_daemon_shutdown) { if (wsgi_active_requests == 0) { ap_log_error(APLOG_MARK, APLOG_INFO, 0, wsgi_server, "mod_wsgi (pid=%d): Requests have completed, " |