From 3cc86d866f1e1ae57db06080ae3b2dd048c72cc2 Mon Sep 17 00:00:00 2001 From: ginnoir Date: Tue, 9 Jun 2026 18:06:38 -0500 Subject: [PATCH] fix(vault): raise memlock ulimit to unlimited Newer hashicorp/vault:latest mlocks more memory than docker's default 64KB memlock ulimit allows; vault crash-looped for ~5900 restarts with 'Failed to lock memory: cannot allocate memory' despite cap_add IPC_LOCK. Deployed via apply-compose.ps1 -Portainer (mgmt plane, not a git stack). --- portainer-compose.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/portainer-compose.yml b/portainer-compose.yml index 9730e8e..7e6c5fd 100644 --- a/portainer-compose.yml +++ b/portainer-compose.yml @@ -52,6 +52,13 @@ services: - edge cap_add: - IPC_LOCK + # Newer vault:latest mlocks more than docker's default 64KB memlock ulimit; + # without this it crash-loops with "Failed to lock memory: cannot allocate + # memory" despite IPC_LOCK being granted. + ulimits: + memlock: + soft: -1 + hard: -1 environment: - VAULT_ADDR=http://0.0.0.0:8200 volumes: