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

Virtual Threads in Java 21: Simplified Concurrency for Modern Applications

  With Java 21, Virtual Threads have redefined how we approach concurrency, offering a lightweight and efficient way to handle parallel and ...