From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id C36701F572; Mon, 15 Jul 2024 23:58:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1721087889; bh=Dr3ehw5f25nwNI8SB26UwAQF6VcR3VeWSRLHA1cBAmk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jJctpDq7c3Z9ylymZqbaXKBa+wojZKp1Bz51//0iZGC40ZZfIoyLRTkAvs9570pu0 2ZEv79Ue/OiVEtan9VzF7I5LHIJAM+W7eY8igM/FsfDVc4J02V8SWaLw3tNPqdQFZQ Jj2J80sI4qa6x29TTagLBA07XEkfBcg0klaCzvgo= Date: Mon, 15 Jul 2024 23:58:08 +0000 From: Eric Wong To: "Robin H. Johnson" Cc: meta@public-inbox.org, infra@gentoo.org Subject: Re: public-inbox skipping new inboxes or many mails Message-ID: <20240715235808.M590962@dcvr> References: <20240715210340.M929931@dcvr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: "Robin H. Johnson" wrote: > TL;DR: kill -USR1 seems to have triggered the import now, whereas even a > restart didn't before. OK, good to know. > On Mon, Jul 15, 2024 at 09:03:40PM +0000, Eric Wong wrote: > > Currently, public-inbox-watch is the only public-inbox-* tool which > > works directly with Maildirs. > HMm, I had excluded public-inbox-watch initially because it didn't seem > to be doing anything after the very long startup. I'm thinking that the > inotify is not working as expected, maybe relating to the huge number of > folders we watch. -watch is (or should be) doing a full scan every startup, but it switches between inboxes every few messages and tries to prioritize new messages from inotify. Curious to see the strace immediately after startup to see if it's indeed doing the full scan. I should probably add a stderr diagnostic for full scan completion... How many Maildirs are you watching? I wonder if it's hitting RLIMIT_NOFILE... (errors should be logged to stderr). In retrospect, it'd probably be better to go one Maildir at a time to reduce open FDs... I'll work on that. > Terminal 1: > # strace -p $(pidof /usr/bin/public-inbox-watch) -ff > strace: Process 93260 attached > pselect6(8, [3 4], NULL, NULL, NULL, NULL > (nothing more) Curious, which architecture is that and is it using Linux::Inotify2 or inotify via the `syscall' perlop? (I expect 3 is the inotify FD). You may also be running into fs.inotify.max_user_watches or max_queued_events sysctl limits; each Maildir costs 2 inotify watches; and it looks like I forgot to handle IN_Q_OVERFLOW properly :x