diff --git a/ChangeLog b/ChangeLog index a1902b0d..ea9d224d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +v1.15.23 +-------------------------------------------------------------------------------- + * H2MinWorker is reduced automatically to 1 during graceful shutdown + of a child process (e.g. server reload). This lets all ongoing requests + continue, but shuts down unused threads early. + The H2MaxWorkerIdleSeconds is also reduced to 1, so that any workers + for ongoing tasks will close down fast. + v1.15.22 -------------------------------------------------------------------------------- * Added a timeout to h2 worker cleanup to exit latest after 5 seconds of diff --git a/configure.ac b/configure.ac index 01f023c9..feb8d46b 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ # AC_PREREQ([2.69]) -AC_INIT([mod_http2], [1.15.22], [stefan.eissing@greenbytes.de]) +AC_INIT([mod_http2], [1.15.23], [stefan.eissing@greenbytes.de]) LT_PREREQ([2.2.6]) LT_INIT() diff --git a/mod_http2/h2_version.h b/mod_http2/h2_version.h index acd7288a..da9b2534 100644 --- a/mod_http2/h2_version.h +++ b/mod_http2/h2_version.h @@ -27,7 +27,7 @@ * @macro * Version number of the http2 module as c string */ -#define MOD_HTTP2_VERSION "1.15.22-git" +#define MOD_HTTP2_VERSION "1.15.23-git" /** * @macro @@ -35,7 +35,7 @@ * release. This is a 24 bit number with 8 bits for major number, 8 bits * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203. */ -#define MOD_HTTP2_VERSION_NUM 0x010f16 +#define MOD_HTTP2_VERSION_NUM 0x010f17 #endif /* mod_h2_h2_version_h */ diff --git a/mod_http2/h2_workers.c b/mod_http2/h2_workers.c index 601c8edb..ab8d49b5 100644 --- a/mod_http2/h2_workers.c +++ b/mod_http2/h2_workers.c @@ -480,6 +480,8 @@ apr_status_t h2_workers_unregister(h2_workers *workers, struct h2_mplx *m) void h2_workers_graceful_shutdown(h2_workers *workers) { workers->shutdown = 1; + workers->min_workers = 1; + workers->max_idle_duration = apr_time_from_sec(1); h2_fifo_term(workers->mplxs); wake_non_essential_workers(workers); } diff --git a/mod_http2/h2_workers.h b/mod_http2/h2_workers.h index cc310c9b..2aa3b3a3 100644 --- a/mod_http2/h2_workers.h +++ b/mod_http2/h2_workers.h @@ -38,9 +38,9 @@ struct h2_workers { apr_pool_t *pool; int next_worker_id; - apr_uint32_t min_workers; apr_uint32_t max_workers; - apr_interval_time_t max_idle_duration; + volatile apr_uint32_t min_workers; /* is changed during graceful shutdown */ + volatile apr_interval_time_t max_idle_duration; /* is changed during graceful shutdown */ volatile int aborted; volatile int shutdown;