Docker Swarm containers suddenly have nofile soft limit 1024 after upgrade (containerd.io 2.1.5 on Ubuntu 24.04)
08:24 13 Nov 2025

After upgrading Docker on my Ubuntu 24.04 Servers (or running apt upgrade), Swarm services suddenly inherit:

Max open files: soft=1024, hard=524288

MongoDB, Redis, etc. suddenly throw file descriptor errors like too many open files on Mongo

Adding ulimits to stack YAML fixes it. Downgrading Docker does not fix it.

Why is this the case and how to fix it?

docker docker-swarm containerd