Skip to content

Add diagnostic for max_user_watches on Linux

Mark Florian requested to merge max-user-watches-diagnostic into main

What does this merge request do and why?

This checks that fs.inotify.max_user_watches has a reasonable value on Linux systems.

A low max_user_watches value can cause webpack/Vite/Jest/IDE failures.

How to set up and validate locally

Linux

  1. Set fs.inotify.max_user_watches to a low value: sudo sysctl --write fs.inotify.max_user_watches=8192
  2. Run gdk doctor
  3. Observe warning
  4. Set it to a high value: sudo sysctl --write fs.inotify.max_user_watches=524288
  5. Run gdk doctor
  6. Observe no warning this time

macOS

  1. Run gdk doctor
  2. Observe no warning

Impacted categories

The following categories relate to this merge request:

Merge request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • Documentation added/updated, if needed.
  • Announcement added, if change is notable.
  • gdk doctor test added, if needed.
  • Add the ~highlight label if this MR should be included in the CHANGELOG.md.
Edited by Mark Florian

Merge request reports