当前位置: 代码网 > it编程>编程语言>Java > pycharm:External file changes sync may be slow: The current inotify(7) watch limit is too low

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

2024年08月02日 Java 我要评论
系统:Ubuntu20.04这个报错的意思就是当前设置的默认"watch handle" to be set for each directory in the project,默认是监视句柄达不到系统或者项目需求。

前言

系统:ubuntu20.04

这个报错的意思就是当前设置的默认"watch handle" to be set for each directory in the project,默认是监视句柄达不到系统或者项目需求
在这里插入图片描述

  • 官方建议设置为524288
/etc/sysctl.conf*.confidea.conf/etc/sysctl.d/fs.inotify.max_user_watches = 524288

具体操作步骤

  1. 打开terminal,查看当前设置
$ cat /proc/sys/fs/inotify/max_user_watches

我当前是65536
在这里插入图片描述
2. 在/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

  1. 重启系统,并重启ide
sudo sysctl -p --system
(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com