Introduction
Problem
Vault takes a long time to start often in excess of 3 minutes after a host boot. Vault starts quickly if only the service is restarted
Cause
- There was an issue in Vault versions less than 1.8.8, 1.9.3, 1.10.0 with raft storage where the data store check took an excessive amount of time to verify it's self in some scenarios causing long start times. The issues was mitigated by the implementation of https://github.com/hashicorp/vault/pull/13573
Overview of possible solutions
Solutions:
-
Set the
VAULT_RAFT_FREELIST_SYNC=1
environment variable which would limit this check and test restarting the host to see if it resolves the issue. note: Having this environment variable set can cause Vault performance issues -
Upgrade Vault to version equal to or later than 1.8.8, 1.9.3, 1.10.0
Outcome
Vault starts in a reasonable amount of time (less than 3 minutes)