Skip to content
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

Number of inotify watches was reached #24

Closed
daemonza opened this issue Apr 24, 2012 · 2 comments
Closed

Number of inotify watches was reached #24

daemonza opened this issue Apr 24, 2012 · 2 comments

Comments

@daemonza
Copy link

Not really a issue, but I ran in a problem on Linux where I hit the max number of inotify watches.

Doing the following, seems to fixed the issue :

echo 32000 >> /proc/sys/fs/inotify/max_user_watches

Here is the dump it generates when you hit the limit.

root@node:~/MacBak# /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/watcher.rb:80:in `initialize': No  
space left on device - Failed to watch   "/var/www/apache2//downloads/MapSDKs/Blackberry/1.1.2/Documentation/search":
The user limit on the total  number of inotify  watches was reached or the kernel failed to allocate a needed resource. (Errno::ENOSPC)
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:190:in `new'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:190:in `watch'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:199:in `watch'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:195:in `block in watch'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:192:in `each'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:192:in `watch'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:195:in `block in watch'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:192:in `each'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:192:in `watch'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:195:in `block in watch'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:192:in `each'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:192:in `watch'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:195:in `block in watch'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:192:in `each'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:192:in `watch'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:195:in `block in watch'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:192:in `each'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:192:in `watch'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:195:in `block in watch'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:192:in `each'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:192:in `watch'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:195:in `block in watch'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:192:in `each'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:192:in `watch'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:195:in `block in watch'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:192:in `each'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:192:in `watch'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/listen-0.4.1/lib/listen/adapters/linux.rb:73:in `block in init_worker'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/listen-0.4.1/lib/listen/adapters/linux.rb:72:in `each'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/listen-0.4.1/lib/listen/adapters/linux.rb:72:in `init_worker'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/listen-0.4.1/lib/listen/adapters/linux.rb:19:in `initialize'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/listen-0.4.1/lib/listen/adapter.rb:37:in `new'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/listen-0.4.1/lib/listen/adapter.rb:37:in `select_and_initialize'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/listen-0.4.1/lib/listen/listener.rb:183:in `initialize_adapter'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/listen-0.4.1/lib/listen/listener.rb:44:in `block in start'

/usr/local/rvm/gems/ruby-1.9.2-p290/gems/listen-0.4.1/lib/listen/adapter.rb:132:in ensure in works?': undefined methodstop' for nil:NilClass (NoMethodError)
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/listen-0.4.1/lib/listen/adapter.rb:132:in works?' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/listen-0.4.1/lib/listen/adapter.rb:102:inblock in usable_and_works?'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/listen-0.4.1/lib/listen/adapter.rb:102:in each' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/listen-0.4.1/lib/listen/adapter.rb:102:inall?'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/listen-0.4.1/lib/listen/adapter.rb:102:in usable_and_works?' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/listen-0.4.1/lib/listen/adapter.rb:36:inselect_and_initialize'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/listen-0.4.1/lib/listen/listener.rb:183:in initialize_adapter' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/listen-0.4.1/lib/listen/listener.rb:44:inblock in start'

@Maher4Ever
Copy link
Contributor

Thanks for reporting this. This is actually documented in the guard README file ("Advanced Linux system configuration"), but we will include it in the README of Listen too.

@thibaudgg
Copy link
Member

What do you think about rescuing this error and inform the use about the command line to run?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants