guard / listen

The Listen gem listens to file modifications and notifies you about the changes.
https://rubygems.org/gems/listen
MIT License
1.92k stars 246 forks source link

Improve wiki on "Increasing the amount of inotify watchers" #473

Closed AxelTheGerman closed 3 years ago

AxelTheGerman commented 4 years ago

Hi, I used Rails for years but now switched to Linux and for the first time ran into the issue of

FATAL: Listen error: unable to monitor directories for changes.
Visit https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers for info on how to fix this.

Thanks for having great documentation, however I was wondering if we should improve it.

It says for ArchLinux to write the new config to /etc/sysctl.d/40-max-user-watches.conf but on my machine I already had /etc/sysctl.d/50-max_user_watches.conf present which continued to overwrite the new limit I was trying to set.

Maybe we should add a note to check the /etc/sysctl.d/ directory for other config files that would overwrite the setting again? Maybe even add this grep command to check the users existing configuration:

$ grep -H -s "fs.inotify.max_user_watches" /etc/sysctl.d/*
/etc/sysctl.d/50-max_user_watches.conf:fs.inotify.max_user_watches=524288

Thanks!

ColinDKelley commented 3 years ago

@AxelTheGerman Those sound like good improvements to make to the docs. Can you make a PR?

seandunn commented 3 years ago

Just to note that the error message given in the terminal currently directs anyone hitting this issue to the main README which doesn't include any information on dealing with it.

ColinDKelley commented 3 years ago

Oops, before deleting the wiki, I meant to copy the references from wiki into the README.

@seandunn How does this look?

https://github.com/guard/listen/pull/521

seandunn commented 3 years ago

That's perfect, thanks @ColinDKelley.