Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Number of inotify watches was reached #24

Closed
daemonza opened this Issue · 2 comments

3 participants

@daemonza

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:in
block 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:in
all?'
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: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'

@Maher4Ever
Collaborator

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
Owner

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

@Maher4Ever Maher4Ever closed this in 5e3053d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.