From cca430ba9a460c53d4fe387535970d022d2116c1 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 8 Oct 2019 11:38:29 +0200 Subject: [PATCH] Merge #16569: Increase init file stop timeout 7fb7acfc206b4bf8c296d72b66f3bd4fe342fd87 Set init stop timeout to 10 min (setpill) Pull request description: `bitcoind` can take a long time to flush its db cache to disk upon shutdown. Systemd sends a `SIGKILL` after a timeout, causing unclean shutdowns and triggering a long "Rolling forward" at the next startup. Disabling the timeout should prevent this from happening, and does not break systemd's `restart` logic. Addresses #13736. ACKs for top commit: instagibbs: utACK https://github.com/bitcoin/bitcoin/pull/16569/commits/7fb7acfc206b4bf8c296d72b66f3bd4fe342fd87 Tree-SHA512: 16e0ce5a9ecf0628f8d93d68db3f5a78ab36021d9bede05a90c84f144db2e87e17707a6eb910cb7c018c265ce2c81d43de2988bd79e4a2d8554515db8fb5aa36 --- contrib/init/dashd.conf | 2 +- contrib/init/dashd.init | 2 +- contrib/init/dashd.service | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/init/dashd.conf b/contrib/init/dashd.conf index 93f7cc1206..096bcc4adc 100644 --- a/contrib/init/dashd.conf +++ b/contrib/init/dashd.conf @@ -16,7 +16,7 @@ expect fork respawn respawn limit 5 120 -kill timeout 60 +kill timeout 600 pre-start script # this will catch non-existent config files diff --git a/contrib/init/dashd.init b/contrib/init/dashd.init index 0013ccfd10..7a341702ef 100644 --- a/contrib/init/dashd.init +++ b/contrib/init/dashd.init @@ -39,7 +39,7 @@ start() { stop() { echo -n $"Stopping $prog: " - killproc $prog + killproc $prog -t600 RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f $lockfile diff --git a/contrib/init/dashd.service b/contrib/init/dashd.service index ed384937b9..8bdb2ae207 100644 --- a/contrib/init/dashd.service +++ b/contrib/init/dashd.service @@ -24,6 +24,7 @@ ExecStart=/usr/bin/dashd -daemon \ Type=forking PIDFile=/run/dashd/dashd.pid Restart=on-failure +TimeoutStopSec=600 # Directory creation and permissions ####################################