How to fix these warnings "External file changes sync may be slow" and "The current inotify(7) watch limit is too low" in IntelliJ Project in Ubuntu

Viewed 7803

I am getting two warning messages in IntelliJ IDEA when I am opening my project.

1. IntelliJ IDEA cannot receive filesystem event notifications
for the project. Is it on a network drive?

2. The current inotify(7) watch limit is too low.

NOTE: I am using UBUNTU 20.04 LTS

Warnings Screenshot

1 Answers

As shared in this link:

Add new conf file..

$ sudo touch /etc/sysctl.d/60-jetbrains.conf

Open the file and add these lines

# Set inotify watch limit high enough for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm).
# Create this file as /etc/sysctl.d/60-jetbrains.conf (Debian, Ubuntu), and
# run `sudo service procps start` or reboot.
# Source: https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit
# 
# More information resources:
# -$ man inotify # manpage
# -$ man sysctl.conf # manpage
# -$ cat /proc/sys/fs/inotify/max_user_watches # print current value in use

fs.inotify.max_user_watches = 524288

Let’s restart the system

$ sudo sysctl -p --system
Related