sysctl.si › Parameters › fs.inotify.max_user_watches

fs.inotify.max_user_watches

How many files one user can watch for changes. IDEs and file syncers hit this.

Default
8192 to 65536
Typical value
524288

When to change it

Fixes the inotify watch limit reached error in IDEs and file syncers. Each watch uses a small amount of kernel memory.

How it works

inotify lets programs ask the kernel to report file changes. Editors, build tools, file syncers and container tools use it. fs.inotify.max_user_watches limits how many files and folders one user can watch at once.

The default depends on the kernel version and RAM. Older kernels use 8192, which large projects exceed quickly. Each watch uses a small amount of kernel memory, roughly 1 KB.

Signs you need to change it

Recommended values by workload

Developer workstation
524288
Large monorepo
1048576
Server without file watchers
Keep the default

Common mistakes

Check the current value

sysctl fs.inotify.max_user_watches

Change it until the next reboot

sudo sysctl -w fs.inotify.max_user_watches=524288

Make it permanent

echo "fs.inotify.max_user_watches = 524288" | sudo tee /etc/sysctl.d/99-custom.conf
sudo sysctl --system

Related parameters

fs.file-max · fs.inotify.max_user_instances

Generate a full sysctl config for your server

Values are starting points. Test on a staging machine and measure before and after.