]> Sergey Matveev's repositories - public-inbox.git/commitdiff
inboxidle: clue users into resolving ENOSPC from inotify
authorEric Wong <e@80x24.org>
Sat, 26 Dec 2020 05:59:22 +0000 (05:59 +0000)
committerEric Wong <e@80x24.org>
Sat, 26 Dec 2020 19:27:15 +0000 (19:27 +0000)
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.

lib/PublicInbox/InboxIdle.pm

index f1cbc012f2bc6bb3bfb6420082282e2ea919d97f..84b6d26f98dfb28fd80dd2bfbca8a70d07e873d5 100644 (file)
@@ -39,6 +39,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)