2

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!

3
  • 4
    That may be a limitation of the VPS - see for example Permission denied when setting values in sysctl on Ubuntu 12.04 Aug 23 '18 at 11:47
  • 1
    @steeldriver 100% it is a limitation of the VPS.
    – Rinzwind
    Aug 23 '18 at 11:48
  • I was bumping up against this error and my problems was that I was including the "$" on my cut/paste of the command - so instead of running 'sudo sysctl -p' I was running '$sudo sysctl -p' - stupid error on my part
    – ChronoFish
    Feb 12 '19 at 15:23
3

Any Help to increase the limit is highly appreciated.

Not going to happen by either you or anyone on Askubuntu.

VPS

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.

0

"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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.