Interview Prep/Linux/Logs, Limits & High-Traffic Tuning

What does `fs.inotify.max_user_watches` do and when do you raise it?

IntermediateProductionLogs, Limits & High-Traffic Tuning
Answer

It limits how many files/directories a user can watch with inotify. Tools that watch large trees (IDEs, webpack, Filebeat, kubelet on nodes with many pods, Promtail) hit it with ENOSPC: System limit for number of file watchers reached or "too many open files" from inotify. Raise fs.inotify.max_user_watches (e.g. 524288) and fs.inotify.max_user_instances (e.g. 1024).

All Linux questions Roadmap: Linux

More on Logs, Limits & High-Traffic Tuning