Urgent.News

What's breaking now, across hundreds of outlets.

Tech

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

Read the original at dev.to →

Report a problem with this story

More in Tech

What are your goals for the week? #206

It's Thanksgiving week in the US. Many people will have a three day workweek followed by a long weekend. If you're working international you won't see us.

  • Focus on Black Friday Sales article for Tuesday publication
  • Personal goals include job search, networking, and side project work
  • Goal-setting thread on Virtual Coffee Slack scheduled for Thursday

More from Monday 23 November →