Visual Studio Code is unable to watch for file changes in this large workspace" (error ENOSPC)

If you get the file watch change issues on Visual Studio Code or PhpStorm, e.g.:

Visual Studio Code is unable to watch for file changes in this large workspace" (error ENOSPC)

Basically you have thousands upon thousands of concurrent file changes happening. Now do this:

cat /proc/sys/fs/inotify/max_user_watches

That is a the limit that can be increased to its maximum by editing /etc/sysctl.conf as root and adding this line to the end of the file:

fs.inotify.max_user_watches=524288

The new value can then be loaded in by running:

sudo sysctl -p

Reference:
https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc

Share this article

1 thought on “Visual Studio Code is unable to watch for file changes in this large workspace" (error ENOSPC)”

Leave a Reply

Your email address will not be published.

Scroll to Top