New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do better when pyinotify out of watches #263

Closed
smidm opened this Issue Jun 4, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@smidm

smidm commented Jun 4, 2014

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

  1. stop trying to add more watches
  2. display more meaningful message on stderr
  3. display a warning dialog and offer instructions how to increase the maximum number of watches

Dropbox has nice instructions how to do it https://www.dropbox.com/help/145/en / "Monitoring more than 10000 folders".

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Jun 4, 2014

Member

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.

Member

davvid commented Jun 4, 2014

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.

@smidm

This comment has been minimized.

Show comment
Hide comment
@smidm

smidm Jun 4, 2014

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.

smidm commented Jun 4, 2014

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.

@davvid davvid closed this in 1546a7d Jun 5, 2014

davvid added a commit that referenced this issue Jun 5, 2014

inotify: pass quiet=False to inotify
1546a7d changed how we handle
add_watch errors but did not pass quiet=False so that inotify would
throw exceptions instead of logging warnings.  Pass quiet=False
so that we get exceptions.

Related-to: #263
Signed-off-by: David Aguilar <davvid@gmail.com>
@smidm

This comment has been minimized.

Show comment
Hide comment
@smidm

smidm Jun 7, 2014

Thanks. You fix issues at lightning speed!

smidm commented Jun 7, 2014

Thanks. You fix issues at lightning speed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment