External file changes sync may be slow: The current inotify(7) watch limit is too low. More details.

项目出现Inotify Watches Limit问题

创建一个文件夹没有反应,必须等很久或者关闭项目在打开项目才出现

更改文件后不更新,必须重启服务器才能够更新

可以查看当前设置

cat /proc/sys/fs/inotify/max_user_watches
# 8192

/etc/sysctl.d文件夹下新建60-jetbrains.conf文件

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

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

重新启动systemd

sudo sysctl -p --system

重启IDE

参考文档https://robbinespu.github.io/eng/2018/08/25/slow_file_changes_sync_inotify_limits.html

具体截图

External file changes sync may be slow: The current inotify(7) watch limit is too low. More details._第1张图片
External file changes sync may be slow: The current inotify(7) watch limit is too low. More details._第2张图片

你可能感兴趣的:(前端)