“code-server is unable to watch for file changes in this large workspace. Please follow the instructions link to resolve this issue.”

“code-server is unable to watch for file changes in this large workspace. Please follow the instructions link to resolve this issue.” 第1张

我的code-server是基于docker的codercom/code-server影像。所以需要修改服务器环境中的max_user_watches值之前需要在docker-compose.yml中添加:privileged: true。

否则会出现这样的情况:

sysctl: setting key "fs.inotify.max_user_watches": Read-only file system

查看max_user_watches值:

cat /proc/sys/fs/inotify/max_user_watches

“code-server is unable to watch for file changes in this large workspace. Please follow the instructions link to resolve this issue.” 第2张

 

修改max_user_watches值:

echo 81920> /proc/sys/fs/inotify/max_user_watches

“code-server is unable to watch for file changes in this large workspace. Please follow the instructions link to resolve this issue.” 第3张

立即生效:

sudo /sbin/sysctl -p

已发布

分类

作者:

评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

0
希望看到您的想法,请您发表评论x