I have a Ubuntu 16.04 LTS (GNU/Linux 2.6.32-042stab127.2 x86_64) VPS I am getting the following error while running my rails application
FATAL: Listen error: unable to monitor directories for changes. Visit https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers for info on how to fix this.
I'm trying to fix that by increasing the watch limit by
$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
$ sudo sysctl -p
it is throwing another error as
sysctl: permission denied on key 'fs.inotify.max_user_watches'
I have root access to the server.
Any Help to increase the limit is highly appreciated. Thanks in advance!
Not going to happen by either you or anyone on Askubuntu.
Take this up with the company hosting the VPS. They do not allow you to change any of those parameters. You are working in a virtual container and those changes to sysctl will affect everyone on that system, not just your container.
"Increasing file descriptors doesn't help me. My tail message was slightly different: tail: inotify resources exhausted. This answer helped me. You can also use sudo sysctl -w fs.inotify.max_user_watches=1048576 && sysctl -p to test if it helps without permanently modifying it. This post also helps nefaria.com/2014/08/tail-inotify-resources-exhausted – djxak Oct 2 '17 at 18:27" djxak comment on tail: inotify cannot be used, reverting to polling: Too many open files I have the same restrictions so I think this worked for me because is a temporal solution:
sudo sysctl -w fs.inotify.max_user_watches=1048576 && sysctl -p