DEV Community

Iyadchafroud
Iyadchafroud

Posted on

Error from chokidar :System limit for number of file watchers

In thid post , we will fix System limit for number of file watchers error .

this error reached because the number of files monitored by the system has reached its limit.
well linux use inotify to monitoring filesystem events .

To know the current limit of max_user_watches :

> `cat /proc/sys/fs/inotify/max_user_watches`
Enter fullscreen mode Exit fullscreen mode

and the current notify user instance limit :

> `cat /proc/sys/fs/inotify/max_user_instances`
Enter fullscreen mode Exit fullscreen mode

If you want to fix error you need to increase the number of max user watches by running the following command:

> `sudo sysctl fs.inotify.max_user_watches=524288`
Enter fullscreen mode Exit fullscreen mode

and increase the number of maximum number of user instances by running the following command:

> ` sudo  fs.inotify.max_user_instances = 1024`
Enter fullscreen mode Exit fullscreen mode

Top comments (0)