From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 8E80F1F4B4 for ; Sat, 26 Dec 2020 05:59:22 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] inboxidle: clue users into resolving ENOSPC from inotify Date: Sat, 26 Dec 2020 05:59:22 +0000 Message-Id: <20201226055922.19294-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/PublicInbox/InboxIdle.pm b/lib/PublicInbox/InboxIdle.pm index 34606186..69da5f4f 100644 --- a/lib/PublicInbox/InboxIdle.pm +++ b/lib/PublicInbox/InboxIdle.pm @@ -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)