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

Incorrect documentation about command to update watcher size #472

Closed ShadabFaiz closed 4 years ago

ShadabFaiz commented 4 years ago

I'm using Manjaro which is Arch based. So as per the documentation, I should run:

echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system

to update watchers. But when i ran it,it did not change the watcher and gave the following output:

fs.inotify.max_user_watches=524288
* Applying /usr/lib/sysctl.d/10-manjaro.conf ...
fs.inotify.max_user_instances = 1024
fs.inotify.max_user_watches = 524288
* Applying /etc/sysctl.d/100-manjaro.conf ...
vm.swappiness = 2
* Applying /etc/sysctl.d/40-max-user-watches.conf ...
fs.inotify.max_user_watches = 524288
* Applying /usr/lib/sysctl.d/50-coredump.conf ...
kernel.core_pattern = |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h %e
* Applying /usr/lib/sysctl.d/50-default.conf ...
kernel.sysrq = 16
kernel.core_uses_pid = 1
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.all.promote_secondaries = 1
net.core.default_qdisc = fq_codel
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
fs.protected_regular = 1
fs.protected_fifos = 1
* Applying /etc/sysctl.d/50-max_user_watches.conf ...
fs.inotify.max_user_watches = 16384

However, when I ran the command which were meant for other distros, it updated the watchers.

mrwulf commented 4 years ago

It looks like you already had a /etc/sysctl.d/50-max_user_watches.conf setting watches to 16384. And the files are loaded in alphanumeric order so 40-max-user-watches.conf sets the value to 524288 (probably right above the top line of your output) and then when it gets to 50-max-user-watches.conf the value is overridden to 16384.

Delete that /etc/sysctl.d/50-max_user_watches.conf and run sudo sysctl --system again....

ShadabFaiz commented 4 years ago

It looks like you already had a /etc/sysctl.d/50-max_user_watches.conf setting watches to 16384. And the files are loaded in alphanumeric order so 40-max-user-watches.conf sets the value to 524288 (probably right above the top line of your output) and then when it gets to 50-max-user-watches.conf the value is overridden to 16384.

Delete that /etc/sysctl.d/50-max_user_watches.conf and run sudo sysctl --system again....

That worked. Thanks