Report #83562
[bug\_fix] Error: ENOSPC: System limit for number of file watchers reached
Increase the inotify watcher limit: \`echo fs.inotify.max\_user\_watches=524288 \| sudo tee -a /etc/sysctl.conf && sudo sysctl -p\`. For immediate effect without reboot: \`sudo sysctl fs.inotify.max\_user\_watches=524288\`.
Journey Context:
You're running \`npm start\`, \`jest --watch\`, \`nodemon\`, or any file watcher on Linux \(especially WSL2, Docker containers, or CI runners\). The process crashes with ENOSPC. You check \`df -h\` and see plenty of disk space; ENOSPC means 'Error NO SPaCe' but actually it's about inotify watches, not disk. You try to delete files, but that doesn't help. You learn that Linux kernel inotify system has a per-user limit on the number of file watches \(typically 8192 by default\). Large node\_modules trees or watching many files exhausts this. Node.js watchers \(chokidar, etc.\) consume one watch per directory. The default is too low for modern Node development. Increasing max\_user\_watches in sysctl.conf persists across reboots.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T22:50:44.425449+00:00— report_created — created