From ce617a03e26c5d5ef0314e1d51d1a30b272f4bff Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 31 Mar 2021 16:18:57 -0700 Subject: [PATCH] fix: set systemd startup timeout to infinity fixes #7369 fixes #8034 --- misc/systemd/ipfs-hardened.service | 7 +++++++ misc/systemd/ipfs.service | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/misc/systemd/ipfs-hardened.service b/misc/systemd/ipfs-hardened.service index bf202218f..87dd08f6a 100644 --- a/misc/systemd/ipfs-hardened.service +++ b/misc/systemd/ipfs-hardened.service @@ -58,6 +58,13 @@ CapabilityBoundingSet=CAP_NET_BIND_SERVICE #don't use swap MemorySwapMax=0 +# Don't timeout on startup. Opening the IPFS repo can take a long time in some cases (e.g., when +# badger is recovering) and migrations can delay startup. +# +# Ideally, we'd be a bit smarter about this but there's no good way to do that without hooking +# systemd dependencies deeper into go-ipfs. +TimeoutStartSec=infinity + Type=notify User=ipfs Group=ipfs diff --git a/misc/systemd/ipfs.service b/misc/systemd/ipfs.service index cd689d3ba..44519de77 100644 --- a/misc/systemd/ipfs.service +++ b/misc/systemd/ipfs.service @@ -29,6 +29,13 @@ After=network.target #don't use swap MemorySwapMax=0 +# Don't timeout on startup. Opening the IPFS repo can take a long time in some cases (e.g., when +# badger is recovering) and migrations can delay startup. +# +# Ideally, we'd be a bit smarter about this but there's no good way to do that without hooking +# systemd dependencies deeper into go-ipfs. +TimeoutStartSec=infinity + Type=notify User=ipfs Group=ipfs