如何在 PhpStorm 中修复 "External file changes sync may be slow: The current inotify(7) watch limit is too low."

How to fix "External file changes sync may be slow: The current inotify(7) watch limit is too low." in PhpStorm

一直在尝试研究这个错误“外部文件更改同步可能很慢:当前的 inotify(7) 监视限制太低。”方法以及如何在 PhpStorm 中修复它,但我似乎无法绕过它。每次我 运行 PhpStorm 时都会弹出该消息。非常感谢任何帮助。

尝试增加 max_user_watches 值,看看是否能解决您的问题。使用 root 权限打开 /etc/sysctl.conf 并将 fs.inotify.max_user_watches 数字更改为更大的数字。

fs.inotify.max_user_watches=524288

修改并保存文件后,运行 sudo sysctl -p 应用更改。重新打开 PhpStorm 并验证警告是否消失。