I am consistently running out of inotify resources, leading to errors along the lines of:
# tail -f /some/files
tail: inotify resources exhausted
tail: inotify cannot be used, reverting to polling
This eventually happens even if I grow the value of fs.inotify.max_user_watches. I suspect a locally installed Java application is consuming the resources, but I don't have the option of either fixing it or removing it.
Is there a way to set a limit on the number of inotify watches that can be consumed by a process?