Inotify Watches Limit

From $1
    Table of contents

    When available, MonoDevelop uses Inotify to keep track of changes in files. In some systems, the maximum number of allowed watch handles may be too low, and may prevent MonoDevelop to work properly.

    To avoid this situation, MonoDevelop will switch to managed file watching if the watches limit is lower than 9000. Managed file watching is less efficient than Inotify based file watching, so it is highly recommended to adjust the Inotify configuration and increase the watches limit. The default is 8192. 16384 is good, 32768 is probably more than enough.

    To change the limit, run:

    # echo 16384 > /proc/sys/fs/inotify/max_user_watches

    To make the change permanent, edit the file /etc/sysctl.conf and add this line to the end of the file:

    Tag page
    • No tags

    Files (0)

    Viewing 3 of 3 comments: view all
    For Ubuntu, sudo echo 16384 > /proc/sys/fs/inotify/max_user_watches gives a permission denied error. sudo sysctl fs.inotify.max_user_watches=16364 should be used instead.
    Posted 02:35, 16 Oct 2010
    On Fedora 16, had to login as root and perform the echo command or edit the file using vi.
    Posted 18:49, 21 May 2012
    "sudo echo 16384 > /proc/sys/fs/inotify/max_user_watches" will not work in Ubuntu because you are running the "echo" command as root, but sending the output to a protected file as your normal user.

    Rather use "echo 16384 | sudo tee /proc/sys/fs/inotify/max_user_watches". (Here you "echo" as your normal user, but send the output to the protected file as root.)


    $ sudo -s
    # echo 16384 > /proc/sys/fs/inotify/max_user_watches

    where "sudo -s" runs a shell as root. Ctrl-D or "exit" to close. edited 10:14, 4 Sep 2012
    Posted 10:09, 4 Sep 2012
    Viewing 3 of 3 comments: view all
    You must login to post a comment.
    Page last modified 15:55, 17 Jul 2007 by Lluis