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

11 篇文章 1 订阅
当使用IntelliJIDEA等IDE时,可能会遇到因inotifywatchlimit过低导致的错误。文章介绍了如何通过增加`fs.inotify.max_user_watches`值至524288,创建配置文件`60-jetbrains.conf`并在系统重启后应用更改来解决此问题。
摘要由CSDN通过智能技术生成

前言

系统:Ubuntu20.04

External file changes sync may be slow: The current inotify(7) watch limit is too low
https://youtrack.jetbrains.com/articles/IDEA-A-2/Inotify-Watches-Limit-Linux

这个报错的意思就是当前设置的默认"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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Vigo*GIS_RS

来瓶可乐~

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值