External file changes sync slow: The current inotify limit is too low

https://robbinespu.github.io/eng/2018/08/25/slow_file_changes_sync_inotify_limits.html

I get this message when waiting gradle task on my Android Studio 3

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

WTF is this? After some google-fu , I found some official instruction from JetBrain. You can read here for more details.

Now, let’s check the current setting:

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

Does the current value are too small? Add new conf file..

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

Open the file and add this lines

# 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

Let’s restart the systemd

$ sudo sysctl -p --system

Now, restart you IDE. It should be no complaint anymore ;d

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值