aboutsummaryrefslogtreecommitdiff
path: root/contrib/init
diff options
context:
space:
mode:
authorsetpill <37372069+setpill@users.noreply.github.com>2019-08-08 11:56:45 +0200
committersetpill <37372069+setpill@users.noreply.github.com>2019-09-06 17:03:04 +0200
commit7fb7acfc206b4bf8c296d72b66f3bd4fe342fd87 (patch)
tree23df65276b26eaf8d91b1a77d0984b21f0d1e287 /contrib/init
parentfbe4b7665b971aec3cf7448309d59d2661e513bd (diff)
downloadbitcoin-7fb7acfc206b4bf8c296d72b66f3bd4fe342fd87.tar.xz
Set init stop timeout to 10 min
`bitcoind` can take a long time to flush its db cache to disk upon shutdown. Most init files send a `SIGKILL` after a timeout of 1 minute, causing unclean shutdowns and triggering a long "Rolling forward" at the next startup. Increasing this timeout to 10 minutes should reduce how often this occurs, especially during IBD. fixup! Set ProtectHome in systemd service file
Diffstat (limited to 'contrib/init')
-rw-r--r--contrib/init/bitcoind.conf2
-rw-r--r--contrib/init/bitcoind.init2
-rw-r--r--contrib/init/bitcoind.openrcconf2
-rw-r--r--contrib/init/bitcoind.service1
4 files changed, 4 insertions, 3 deletions
diff --git a/contrib/init/bitcoind.conf b/contrib/init/bitcoind.conf
index de4ea0ed52..dde1bd0c4d 100644
--- a/contrib/init/bitcoind.conf
+++ b/contrib/init/bitcoind.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/bitcoind.init b/contrib/init/bitcoind.init
index 0c95baf3a1..19e1f76d09 100644
--- a/contrib/init/bitcoind.init
+++ b/contrib/init/bitcoind.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/bitcoind.openrcconf b/contrib/init/bitcoind.openrcconf
index f70e25cb5f..c8a22a08d9 100644
--- a/contrib/init/bitcoind.openrcconf
+++ b/contrib/init/bitcoind.openrcconf
@@ -30,4 +30,4 @@
# Note that this will be mapped as argument to start-stop-daemon's
# '--retry' option, which means you can specify a retry schedule
# here. For more information see man 8 start-stop-daemon.
-BITCOIND_SIGTERM_TIMEOUT=60
+BITCOIND_SIGTERM_TIMEOUT=600
diff --git a/contrib/init/bitcoind.service b/contrib/init/bitcoind.service
index cfc5f77580..fa6a1b000c 100644
--- a/contrib/init/bitcoind.service
+++ b/contrib/init/bitcoind.service
@@ -24,6 +24,7 @@ ExecStart=/usr/bin/bitcoind -daemon \
Type=forking
PIDFile=/run/bitcoind/bitcoind.pid
Restart=on-failure
+TimeoutStopSec=600
# Directory creation and permissions
####################################