Android Studio/Vscode — Low Inotify Watches Limit

Whether you're using Android studio,Vscode or any other IDE, When you see this notification, it means that your IDE file watcher is running out of handles that notify your editor about any external changes in files because your workspace has become large and contains many files.

Unfortunately, the default limit of watch handles may not be enough for reasonably sized projects, and reaching the limit will force your editor to fall back to recursive scans of directory trees.

On Linux based system, it is the Inotify facility. Inotify requires a “watch handle” to be set for each directory in the project.

to see your current watch limit in terminal enter command

cat /proc/sys/fs/inotify/max_user_watches

The limit can be increased to its maximum by editing /etc/sysctl.conf

sudo nano /etc/sysctl.conf

Paste the below line at the end of the file and save exit.


You can check the updated effect by command

sudo sysctl -p 


cat /proc/sys/fs/inotify/max_user_watches

And don’t forget to restart your IDE.

Note: the watches limit is per-account setting. If there are other programs running under the same account which also uses Inotify the limit should be raised high enough to suit the needs of all of them.

Coding enthusiast! love Android #kotlinAlltheWay, want to explore all opportunity around it! CodingMantra: #cleanCoder #TDD #SOLID #designpatterns

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store