Increase inotify file watch limits



inotify has three parameters, that can be set in /proc interfaces: `max_user_instances`, `max_user_watches` and `max_queued_events`.

max_user_watches
You can get the current “max_user_watches” value by executing the below command:
$ cat /proc/sys/fs/inotify/max_user_watches

You can set a new limit temporary with:
$ sudo sysctl fs.inotify.max_user_watches=524288
$ sudo sysctl -p

If you like to make your limit permanent, use:
$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
$ sudo sysctl -p

max_queued_events
You can get the current “max_queued_events” value by executing the below command:
$ cat /proc/sys/fs/inotify/max_queued_eventss

You can set a new limit temporary with:
$ sudo sysctl fs.inotify.max_queued_events=524288
$ sudo sysctl -p

If you like to make your limit permanent, use:
$ echo fs.inotify.max_queued_events=524288 | sudo tee -a /etc/sysctl.conf
$ sudo sysctl -p

max_user_instances
You can get the current “max_user_instancesvalue by executing the below command:
$ cat /proc/sys/fs/inotify/max_user_instances

You can set a new limit temporary with:
$ sudo sysctl fs.inotify.max_user_instances s=524288
$ sudo sysctl -p

If you like to make your limit permanent, use:
$ echo fs.inotify.max_user_instances =524288 | sudo tee -a /etc/sysctl.conf
$ sudo sysctl -p

---