Report #100978
[bug\_fix] Error: ENOSPC: System limit for number of file watchers reached
Increase the inotify watcher limit by running echo fs.inotify.max\_user\_watches=524288 \| sudo tee -a /etc/sysctl.conf && sudo sysctl -p. For a temporary change without rebooting, run sudo sysctl fs.inotify.max\_user\_watches=524288.
Journey Context:
You run npm run dev with Vite, Next.js, or webpack-dev-server and after a few minutes the process dies with ENOSPC. The message says the system limit for file watchers is reached. You check and your project has tens of thousands of files in node\_modules. Linux uses inotify for file watching, and the default max\_user\_watches is often 8192. You increase it to 524288 via sysctl, reload the configuration, and the dev server can now watch all files without crashing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-06T04:46:38.297427+00:00— report_created — created