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).
More on Logs, Limits & High-Traffic Tuning
How does log management work on a modern Linux server?BeginnerWhy centralize logs instead of reading them on each server?BeginnerWrite a logrotate config for an application log.BeginnerWhat is the difference between `copytruncate` and `create` + postrotate signal?IntermediateLogs rotated but disk usage did not drop. Why?IntermediateHow often does logrotate run, and why does `maxsize` sometimes not trigger in time?Intermediate