systemd quietly removed my container's swap limit
TL;DR Caddy, the reverse proxy in front of my service, had a 1 GiB memory cap and no swap allowance. I checked it in the kernel after the deploy: memory.swap.max was 0. Four days later, an unattended libc upgrade re-executed systemd. Docker had never told systemd about the zero, so systemd wrote its own value back: unlimited. Nothing logged it. 20 hours later a traffic burst pushed Caddy to its…
A container's swap limit was quietly removed, causing a 45-minute stall while its containerized application swapped excessively. The issue arose when an unattended upgrade of the C library silently changed the swap limit from zero to an extremely large value. This change occurred without any noticeable logs or alerts. The container's memory limit was properly set to 1 GiB, but without the swap limit, it could freely use as much swap as needed, leading to the unexpected behavior.
The cause was traced back to a systemd cgroup driver update triggered by the libc upgrade, which modified the container's resource settings without any direct intervention. The fix involved setting a proper non-zero swap limit, which the systemd cgroup driver respected.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to