Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Change #5947

Category None
Changed by Bill Erickson <berickxxohnoyoudont@gmail.com>
Changed at Mon 17 Dec 2018 16:13:19
Repository git://git.evergreen-ils.org/OpenSRF.git
Project OpenSRF
Branch master
Revision f3eab1715079243d541dc12fd90db005630ffec9


LP#1803182 Websocketd graceful shutdown support
Give websocketd clients a chance to complete any requests that are
in-process at time of shutdown.

Graceful shutdown is initiated by sending a SIGUSR1 signal to the
websocket-osrf child processes or to the parent process group.

This can be done directly via:

$ kill -s USR1 -$websocketd_parent_pid

Or via systemd for systemd users:

$ sudo systemctl kill -s USR1 websocketd-osrf

Note the websocketd parent process ignores SIGUSR1.

Once initiated, the websocketd backend goes into shutdown mode polling
for a graceful shutdown window, which occurs when all request up to now
have been completed.  Once that moment arrives, the client is kicked off
and must connect to a new websocketd instance to issue any new requests.

The polling period lasts for SHUTDOWN_MAX_GRACEFUL_SECONDS seconds (in
osrf-websocket-stdio.c), which currently defaults to 2 minutes.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>

Changed files