Search code examples
node.jsfile-watcher

Node.js and high amount of watchers with fs


I'm using file system native library of nodejs, but i have problems with fs.watch, high amount of watchers is open, and sometimes node returns ENOSPC error, i localize the problem with linux kernel to open watchers and find that the dropbox app was eating a lot of watchers. My question is, if you know another file system libraries for node that works fine with the file system.


Solution

  • You can increase the max user watches using:

    echo 10000 | sudo tee /proc/sys/fs/inotify/max_user_watches