随笔 · 2019/04/17 0

“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.” 第3张

 

修改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.” 第5张

立即生效:

sudo /sbin/sysctl -p
0
希望看到您的想法,请您发表评论x