From 15d0290a9acc41649494cd35d1dc534bab528961 Mon Sep 17 00:00:00 2001 From: Marian Horban Date: Tue, 27 Oct 2015 14:39:05 -0400 Subject: [PATCH] Document graceful_shutdown_timeout config option In change I0dfbf2d0a4943337da24c0904a1ed6f0cdccd77b option graceful_shutdown_timeout was added. Change-Id: I7564fc97dbe8fbbfc9f3b36e4dfbfabc078495e2 --- doc/source/usage.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/source/usage.rst b/doc/source/usage.rst index c934a312..01df6891 100644 --- a/doc/source/usage.rst +++ b/doc/source/usage.rst @@ -135,8 +135,13 @@ and SIGHUP. SIGTERM is used for graceful termination of services. This can allow a server to wait for all clients to close connections while rejecting new -incoming requests. To force instantaneous termination SIGINT signal must -be sent. +incoming requests. Config option graceful_shutdown_timeout specifies how +many seconds after receiving a SIGTERM signal, a server should continue +to run, handling the existing connections. Setting graceful_shutdown_timeout +to zero means that the server will wait indefinitely until all remaining +requests have been fully served. + +To force instantaneous termination SIGINT signal must be sent. On receiving SIGHUP configuration files are reloaded and a service is being reset and started again. Then all child workers are gracefully @@ -144,6 +149,7 @@ stopped using SIGTERM and workers with new configuration are spawned. Thus, SIGHUP can be used for changing config options on the go. *NOTE:* SIGHUP is not supported on Windows. +*NOTE:* Config option graceful_shutdown_timeout is not supported on Windows. Below is the example of a service with a reset method that allows reloading logging options by sending a SIGHUP.