13

Been trying to research what this error "External file changes sync may be slow: The current inotify(7) watch limit is too low." means and how to fix it in PhpStorm but I seem not to be able to get around it. The message pops up every time I run PhpStorm. Any assistance will be highly appreciated.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Alphy Gacheru
  • 489
  • 1
  • 9
  • 28

2 Answers2

19

Try increasing the max_user_watches values and see if that fixes your issue. Open /etc/sysctl.conf with root permissions and change the fs.inotify.max_user_watches number to a bigger one.

fs.inotify.max_user_watches=524288

After modifying and saving the file, run sudo sysctl -p to apply the changes. Re-open PhpStorm and verify if the warning is gone.

tamrat
  • 1,815
  • 13
  • 19
  • How do I open /etc/sysctl.conf please? – Alphy Gacheru Nov 29 '20 at 22:58
  • 2
    What OS are you using? Usually you can just `sudo nano /etc/sysctl.conf`. You can also use `subl` or `code` or `gedit` instead of `nano`. – tamrat Nov 30 '20 at 07:52
  • Linux mint, I've used the first option but I don't have `fs.inotify.max_user_watches` after openning All I'm getting some codes with some options at the bottom e.g `^G Get Help ^O Write Out ^W Where Is ^K Cut Text` – Alphy Gacheru Nov 30 '20 at 09:04
  • 1
    Scroll to the bottom of the file and add the line. Then save it and run `sudo sysctl -p`. – tamrat Nov 30 '20 at 09:11
2

JetBrains recommendations for this is to increase system file watch limit.

In Debian-based Linux distros best practice is to keep local kernel params changes in a separate file:

echo 'fs.inotify.max_user_watches=32768' | sudo tee -a /etc/sysctl.d/90-jetbrains.conf
sudo sysctl --system

This will prevent config conflicts at system upgrade.

gru
  • 2,319
  • 6
  • 24
  • 39
Alexander Yancharuk
  • 13,817
  • 5
  • 55
  • 55