如何在Ubuntu的IntelliJ项目中修复这些警告“外部文件更改同步可能很慢”和“当前的inotify(7)监视限制太低”
当我打开我的项目时,我在 IntelliJ IDEA 中收到两条警告消息。
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.
注意:我使用的是 UBUNTU 20.04 LTS
回答
在此链接中共享:
添加新的conf文件..
$ sudo touch /etc/sysctl.d/60-jetbrains.conf
打开文件并添加这些行
# 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
让我们重新启动系统
$ sudo sysctl -p --system
THE END
二维码