Skip to end of metadata
Go to start of metadata

The article has been moved to

  • No labels


  1. Hi - any idea where I'd find sysctl.conf in IntelliJ 10 (Community Edition) installed on Ubuntu?

    1. /etc/sysctl.conf
      It is a system file, not an IDEA one.

  2. FYI: this solution does not seem to work under CentOS not sure what the correct fix is at this point.

  3. OK, should have looked first, here's the procedure for CentoOS

    1. To the end of /etc/sysctl.conf add the line: fs.inotify.max_user_watches = 5242881
    2. Apply the changes with the command sysctl -p
    1. Sorry, but what's the difference? You just increased the limit to over 5 million (5,242,881 instead of proposed 524,288). Is there any point to set the limit that high?

  4. Considering the following situation: 10 developers work on the working copies, mounted via sshfs from a single server. Don't ask me why, it's not my call.
    Should I adjust this settings on developers' working stations and also on server with the value 10 times as big?

    1. Though I've never tried it over sshfs but I'm pretty sure it won't work. Network-mounted FS don't produce file change notifications.

  5. On Fedora, and I suspect other Linux OSes too, the correct solution is not to edit /etc/sysctl.conf but rather to create a new file in /etc/sysctl.d such as "/etc/sysctl.d/idea.conf" and place the config line there.

    1. Sysctl.d is more for packages. It's ok to place user-configured settings in sysctl.conf.

      1. Speaking of packages, it would be nice to have one.(smile)

        Meanwhile I'd also put the change into a separate file under /etc/sysctl.d .

          I'm not telling not to do, just saying sysctl.conf is quite a correct way too.

    2. Also, at least on Fedora 23,  sysctl -p  doesn't reload the settings. You need to do this instead:

      systemctl restart systemd-sysctl.service
  6. In ubuntu 12+, you needn't edit the sysctl.conf file. Just do

    sudo sysctl fs.inotify.max_user_watches=xxxxx

    This updates the entry in /proc/sys/fs/inotify/max_user_watches but does not seem to modify the /etc/sysctl.conf file.

    1. Right, but it will last only until reboot.

      1. Yup. True that. Modified sysctl.conf (like I should have in the first place!) and it worked like a charm.

        Thanks Roman.

  7. JRo

    I don't understand why it is necessary to set up this limit so high. And it not a good thing to give such a hight value as the must-do in a wiki !

    I f you google a little bit, you'll find that the memory used by inotify is 540 * nb of watches on 32bit systems and so 1080 on 64bit ones. 524288 * 1080 = 566 231 040 => 540MiB only for that !

    Stackoverflow suggest to count your files to give you a closer idae of how much you really need. I done wih only 92000 max watches on my 8Go source dir .

    1. The links provided clearly say that unused watches does not take any memory.

  8. For Arch Linux users, this solution won't work after version 207 according to this news. But the news also give a work around.

    Following for the lazy people:

    # vi /etc/sysctl.d/99-sysctl.conf

    Then add the line mentioned above:

    fs.inotify.max_user_watches = 524288

    Or you can just:

    # echo "fs.inotify.max_user_watches = 524288" >> /etc/sysctl.d/99-sysctl.conf

    Don't forget:

    # sysctl -p

    1. While running sysctl -p on Arch Linux I got:

      sysctl: cannot open "/etc/sysctl.conf": No such file or directory

      The correct command seems to be:

      # sysctl -p /etc/sysctl.d/99-sysctl.conf

    2. When writing settings in the 


      files, then you should load them via

      sudo sysctl --system


      sudo sysctl -p

      With no parameters is looking directly for the specific /etc/sysctl.conf file.


      Have a nice day,



  9. After version 207 SYSTEMD no longer reads from "/etc/sysctl.conf".  It reads from "etc/systctl.d/##-sysctl.conf"  Where ## means any number 01-99.


  10. Similarly to what has been suggested above for Arch Linux, also on Debian systems (like Ubuntu) one should not modify /etc/sysctl.conf, but create a new file in /etc/sysctl.d/. This will keep your system package upgradable.

    I've prepared a Gist for all the lazy ones: 60-jetbrains.conf (placed this file in /etc/sysctl.d/)

  11. Is there a way to disable the inotify warn in IntelliJ IDEA? In Manjaro Linux and IDEA 2016.1/2016.2 with the default max_user_watches settings everything is OK and I don't see  any reason why I should change the setting.

  12. This post suggests two approaches to resolve the issues. The first one is to append a line in /etc/sysctl.conf, however that doesn't work for me! The second approach does work!