w
On 24/07/2026 14:46 EEST John Fawcett via dovecot <dovecot@dovecot.org> wrote:
On 24/07/2026 08:13, Aki Tuomi via dovecot wrote:
On 24/07/2026 08:13 EEST Aki Tuomi via dovecot <dovecot@dovecot.org> wrote:
On 21/07/2026 01:00 EEST John Fawcett via dovecot <dovecot@dovecot.org> wrote:
On 20/07/2026 16:53, MK via dovecot wrote:
>>> [snip] >>> >> Hi >> >> it appears to be a bug in dovecot 2.4.x when iterating thousands of users. >> >> See >> https://dovecot.org/mailman3/archives/list/dovecot@dovecot.org/message/P5QBZ... >> >> The fix I posted there did bypass the issue during a test I did. I am >> not sure it could be treated as a definitive fix. Another workaround is >> to iterate outside dovecot. >> >> John > Hi, > > did you get a feedback from someone of the dovecot developer? Since your request is 4 month ago. > So this sounds like my used workarround seem to be the best we can do at the moment, as Philip did the same. > Do you have experiences if this works with about 40k users or more too? (doveadm user '*', cache this and then execute doveadm -u for each user) > > Oliver > > > __________ Hi Oliver
so far I haven't seen any follow up from the development team. It's bad that no one is taking care of it. I guess it is not one of the high priority issues at the moment. In my experience doveadm user '*' also runs into the same trouble for large numbers of users. I got issues with even 20K users on 2.4.x. At the moment I'm using it for ~ 4400 user and have no problems. I'm curious to see how it works with 40k users.
Where the users are in a mysql database, you could query the db directly to get the usernames and then execute doveadm -u for each user. Sure, that's an option if the doveadm iterate did not work for that mutch user.
Thanks Oliver
Hi all
this is a revised fix. This looks like the minimal fix. The alternative is to refactor the auth-master-connection code to make it compatible with the 2.4 throttling logic. Setting output_throttle_size to zero will then just use the same throttling mechanism as there was in 2.3.21, which is still present in 2.4 for this code path. The problem arises when both mechanisms are active.
John
diff -u dovecot-2.4.4/src/auth/auth-master-connection.c.orig dovecot-2.4.4/src/auth/auth-master-connection.c --- dovecot-2.4.4/src/auth/auth-master-connection.c.orig 2026-07-20 22:55:09.153747336 +0200 +++ dovecot-2.4.4/src/auth/auth-master-connection.c 2026-07-20 22:55:32.423163048 +0200 @@ -740,7 +740,7 @@ .dont_send_version = TRUE, .input_max_size = MAX_INBUF_SIZE, .output_max_size = SIZE_MAX, - .output_throttle_size = MAX_OUTBUF_SIZE, + .output_throttle_size = 0, };
static int
Sorry for missing on this, we'll take a look at the problem and the proposed fix.
Aki
This bug is already fixed in 2.4.3 with https://github.com/dovecot/core/compare/41b244c9%5E...d4362583.patch
Aki
Thanks Aki
you're right it is solved in 2.4.3. That surprised me since I was still seeing iterate errors on 2.4.4. and I wrongly assumed it was due to the same cause. Looking into it I am now sometimes hitting a timeout of 155 seconds. This is with 20K users configured. It takes approx 140 secs for "doveadm quota get -A" with users in mysql, but turning on the debugging tends to bring it over the 155 second limit. I guess that with 30K users I'd be always hitting the timeout.
Seems each user iteration is taking a bit longer in 2.4.4 than on 2.4.1. If I get time I'll see if I can put some concrete numbers around the difference.
John
Can you send us logs and such? Aki