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

Creating REST APIs with OpenAPI, Spring Boot 3.3.3, Java 21, and Jakarta

 Introduction In today's software landscape, designing robust and scalable REST APIs is a crucial aspect of application development. Wit...