How can I fix below problem? I am using compass.
Too many open files - Failed to initialize inotify: the user limit on the total number of inotify instances has been reached. /home/rmack/Downloads/compass.app/lib/ruby/jruby/rb-inotify-0.9.5/lib/rb-inotify/notifier.rb:64:in `initialize' /home/rmack/Downloads/compass.app/lib/ruby/jruby/listen-1.3.1-patched/lib/listen/adapters/linux.rb:66:in `initialize_worker' /home/rmack/Downloads/compass.app/lib/ruby/jruby/listen-1.3.1-patched/lib/listen/adapter.rb:87:in `initialize' /home/rmack/Downloads/compass.app/lib/ruby/jruby/listen-1.3.1-patched/lib/listen/adapters/linux.rb:31:in `initialize' /home/rmack/Downloads/compass.app/lib/ruby/jruby/listen-1.3.1-patched/lib/listen/adapter.rb:226:in `works?' /home/rmack/Downloads/compass.app/lib/ruby/jruby/listen-1.3.1-patched/lib/listen/adapter.rb:190:in `usable_and_works?' org/jruby/RubyEnumerable.java:1425:in `all?' /home/rmack/Downloads/compass.app/lib/ruby/jruby/listen-1.3.1-patched/lib/listen/adapter.rb:190:in `usable_and_works?' /home/rmack/Downloads/compass.app/lib/ruby/jruby/listen-1.3.1-patched/lib/listen/adapter.rb:57:in `select_and_initialize' org/jruby/RubyArray.java:1613:in `each' /home/rmack/Downloads/compass.app/lib/ruby/jruby/listen-1.3.1-patched/lib/listen/adapter.rb:55:in `select_and_initialize' /home/rmack/Downloads/compass.app/lib/ruby/jruby/listen-1.3.1-patched/lib/listen/listener.rb:291:in `initialize_adapter' /home/rmack/Downloads/compass.app/lib/ruby/jruby/listen-1.3.1-patched/lib/listen/listener.rb:283:in `setup' /home/rmack/Downloads/compass.app/lib/ruby/jruby/listen-1.3.1-patched/lib/listen/listener.rb:65:in `start!' /home/rmack/Downloads/compass.app/lib/ruby/compass_1.0/sass-3.4.13/lib/sass/plugin/compiler.rb:405:in `listen_to' /home/rmack/Downloads/compass.app/lib/ruby/compass_1.0/sass-3.4.13/lib/sass/plugin/compiler.rb:338:in `watch' /home/rmack/Downloads/compass.app/lib/ruby/compass_1.0/compass-1.0.3/lib/compass/sass_compiler.rb:46:in `watch!' /home/rmack/Downloads/compass.app/lib/ruby/compass_1.0/compass-1.0.3/lib/compass/commands/watch_project.rb:41:in `perform' file:/home/rmack/Downloads/compass.app/compass-app.jar!/app_watcher.rb:12:in `watch!' file:/home/rmack/Downloads/compass.app/compass-app.jar!/ui/tray.rb:447:in `watch'
"Too many open files " errors happen when a process needs to open more files than it is allowed by the operating system. This number is controlled by the maximum number of file descriptors the process has. 2. Explicitly set the number of file descriptors using the ulimit command.
To find out the maximum number of files that one of your processes can open, we can use the ulimit command with the -n (open files) option. And to find the maximum number of processes a user can have we'll use ulimit with the -u (user processes) option.
inotify. max_user_watches define user limits on the number of inotify resources and inotify file watches. If these limits are reached, you may experience processes failing with error messages related to the limits, for example: ENOSPC: System limit for number of file watchers reached...
For Linux:
Check current value of max_user_instances
:
$ cat /proc/sys/fs/inotify/max_user_instances
increase that value:
$ echo 256 > /proc/sys/fs/inotify/max_user_instances
In order to make that change permanent add a line to /etc/sysctl.conf
:
fs.inotify.max_user_instances = 256
This is usually a linux config issue. Increase the number of files open in the /etc/security/limits.conf
:
It looks like you're using Mac OS in which case you should use sysctl. Add the following to the /etc/sysctl.conf
:
kern.maxfiles=your new value kern.maxfilesperproc=your new value
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With