Unable to monitor filesystem Please run: echo 100000 | sudo tee /proc/sys/fs/inotify/max_user_watches and restart Dropbox to correct the problem.
No space left on device - Failed to watch "…": The user limit on the total number of inotify watches was reached or the kernel failed to allocate a needed resource. (Errno::ENOSPC)
man inotify(7) says:
The following interfaces can be used to limit the amount of kernel memory consumed by inotify:
The value in this file is used when an application calls inotify_init(2) to set an upper limit on the number of events that can be queued to the corresponding inotify instance. Events in excess of this limit are dropped, but an IN_Q_OVERFLOW event is always generated.
This specifies an upper limit on the number of inotify instances that can be created per real user ID.
This specifies an upper limit on the number of watches that can be created per real user ID.
In this case, Dropbox and guard have to use many watches, so do this and increase
# Check current maximum $ cat /proc/sys/fs/inotify/max_user_watches 8192 # Increase the maximum $ echo 100000|sudo tee /proc/sys/fs/inotify/max_user_watches Password: 100000 # Check $ cat /proc/sys/fs/inotify/max_user_watches 100000
Doing the above increases
max_user_watches at boot, edit
/etc/sysctl.conf and add
fs.inotify.max_user_watches=100000 or fix
(Note: I'm using gentoo so some other distros may have another way to do this…)