ENOSPC Error With Free Disk Space? The Culprit Is Linux Inotify Watch Limit
Linux systems can throw an 'ENOSPC — No space left on device' error even when disk space and inodes are plentiful, misleading engineers into chasing the wrong problem. The real cause is often the kernel's inotify watch limit, a finite pool of file-change notification slots consumed by tools like log shippers, config reloaders, and monitoring agents. Each watched directory uses one slot, and the default ceiling of 8,192 watches can be exhausted quickly on hosts running multiple containers or large directory trees. Administrators can confirm the issue by checking kernel logs via dmesg or journalctl for an 'inotify watch limit reached' message. The fix involves raising the fs.inotify.max_user_watches value via a sysctl drop-in file under /etc/sysctl.d/ to make the change persistent across reboots.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in