Make systemd invoke dependencies only when ready by using -daemonwait
in the service file instead of -daemon
.
Closes #21322 by making bitcoind conform to behavior specified for type=forking
.
This may need some tuning of timeouts.
This may need some tuning of timeouts.
Just to be sure I checked this. However we don’t have a timeout configured for startup phase at all; this is
TimeoutStartSec=
Configures the time to wait for start-up. If a daemon service does not signal start-up completion within the configured time, the service will be considered failed and will be shut down again. Takes a unit-less value in seconds, or a time span value such as “5min 20s”. Pass “infinity” to disable the timeout logic. Defaults to DefaultTimeoutStartSec= from the manager configuration file, except when Type=oneshot is used, in which case the timeout is disabled by default (see systemd-system.conf(5)).
We might want to set this to infinity
—the startup phase (including the 6-deep block database integrity check) can take a lot of time it is hard to put an upper bound on it. In any case I expect the service default to be too low.
Agree
In any case I expect the service default to be too low.
man systemd-system.conf
says that DefaultTimeoutStartSec
defaults to 90s
Closes #21322 by making bitcoind conform to behavior specified for
`type=forking`.
man systemd-system.conf says that DefaultTimeoutStartSec defaults to 90s
Thank you for checking. I have set TimeoutStartSec=infinity
for now. I don’t think there is a need for a timeout here. Startup timeout is meant for things like network and remote filesystem bringup which hold up the entire boot, eventually one would want to continue and be able to fix whatever the issue is. I would hope no one configures bitcoind
as part of that chain, so it can always be manually shut down when necessary.
Labels
Scripts and tools