unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: "Robin H. Johnson" <robbat2@gentoo.org>
Cc: meta@public-inbox.org, infra@gentoo.org
Subject: Re: public-inbox skipping new inboxes or many mails
Date: Mon, 15 Jul 2024 23:58:08 +0000	[thread overview]
Message-ID: <20240715235808.M590962@dcvr> (raw)
In-Reply-To: <robbat2-20240715T213134-641912326Z@orbis-terrarum.net>

"Robin H. Johnson" <robbat2@gentoo.org> 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

  reply	other threads:[~2024-07-15 23:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-15  6:15 public-inbox skipping new inboxes or many mails Robin H. Johnson
2024-07-15 21:03 ` Eric Wong
2024-07-15 21:45   ` Robin H. Johnson
2024-07-15 23:58     ` Eric Wong [this message]
2024-07-16  5:45       ` Robin H. Johnson
2024-07-16 19:05         ` Eric Wong
2024-07-17  3:04           ` Robin H. Johnson
2024-07-17 23:25             ` Eric Wong
2024-07-17 23:50               ` Eric Wong
2024-07-18  0:02               ` Robin H. Johnson
2024-12-15  0:49             ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240715235808.M590962@dcvr \
    --to=e@80x24.org \
    --cc=infra@gentoo.org \
    --cc=meta@public-inbox.org \
    --cc=robbat2@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).