The limit is found here: /proc/sys/fs/inotify/max_user_watches and defaults to 8K, not 300K, so I don't think it's the cause of this problem.