Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
do better when pyinotify out of watches #263
When inotify runs out of watches I got a lots of these:
[2014-06-04 09:53:12,619 pyinotify ERROR] add_watch: cannot watch WD=-1, Errno=No space left on device (ENOSPC)
Better handling would be
Dropbox has nice instructions how to do it https://www.dropbox.com/help/145/en / "Monitoring more than 10000 folders".
Indeed, this would be a good thing to improve. Do you know whether inotify's add_watch() raises when we hit this limit? That would be a good place to catch the exception and warn.
I'll try some testing tomorrow by setting the watch limit really low to see if there's an easy way to detect this via the inotify python API.
It seems according to http://seb-m.github.io/pyinotify/pyinotify.WatchManager-class.html#add_watch that add_watch() throws WatchManagerError when called with quite=False and an error occurs.