Wednesday, March 16, 2022

VScode watcher limit Ubuntu 20.04

Visual Studio Code is unable to watch for file changes in this large workspace


When you see this notification, it indicates on your project it had many files and you need to change default value watchers (8192), provide Linux VM, because it is insufficient to the tasks, The watchers is part inotify Linux kernel subsystem.  

If you want to see your default watchers run the following command.

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

If you get many files on your project then the default watcher is not enough to monitor all files.
you need increased for listen to work properly.

Increased limit temporary run the following command

$ sudo sysctl fs.inotify.max_user_watches=524288

$ sudo sysctl -p


Increased limit permanet run the following command

$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf

$ sudo sysctl -p





















No comments:

Post a Comment

Provisioning Cloud SQL with Private Service Connect Using Terraform & Accessing from Cloud Run with Spring Boot

In this post, we'll explore how to provision Cloud SQL instances with Private Service Connect (PSC) connectivity using Terraform and the...