From: Eric Wong Date: Sat, 26 Dec 2020 05:59:22 +0000 (+0000) Subject: inboxidle: clue users into resolving ENOSPC from inotify X-Git-Tag: v1.6.1~5 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=a0b470cbaf01c699e008818ff0f137d24b1959b1 inboxidle: clue users into resolving ENOSPC from inotify It may not be obvious to users a ENOSPC error is from hitting a (tunable) kernel-imposed limit on inotify watches, and not some storage device running out of space. Give them a hint here to reduce our own support burden. (cherry picked from commit 5e05c2eb58a450849f1826f3d02ed62b814b6617) --- diff --git a/lib/PublicInbox/InboxIdle.pm b/lib/PublicInbox/InboxIdle.pm index 0cdd2e2a..357bd216 100644 --- a/lib/PublicInbox/InboxIdle.pm +++ b/lib/PublicInbox/InboxIdle.pm @@ -45,6 +45,11 @@ sub in2_arm ($$) { # PublicInbox::Config::each_inbox callback $self->{on_unlock}->{$w->name} = $ibx; } else { warn "E: ".ref($inot)."->watch($lock, IN_MODIFY) failed: $!\n"; + if ($!{ENOSPC} && $^O eq 'linux') { + warn <<""; +I: consider increasing /proc/sys/fs/inotify/max_user_watches + + } } # TODO: detect deleted packs (and possibly other files)