# IMAP “Concurrent request limit reached” (0.16.25)

**URL:** https://support.stalw.art/t/imap-concurrent-request-limit-reached-0-16-25/1926
**Category:** Questions
**Created:** [October 13, 2026, 7:55am UTC](https://support.stalw.art/t/imap-concurrent-request-limit-reached-0-16-25/1926 "2026-10-13T07:55:02Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![trigg3r](https://support.stalw.art/letter_avatar_proxy/v4/letter/t/cc9497/32.png) [@trigg3r](https://support.stalw.art/u/trigg3r)
#### Post date: [October 13, 2026, 7:55am UTC](https://support.stalw.art/t/imap-concurrent-request-limit-reached-0-16-25/1926/1 "2026-10-13T07:55:02Z")

</div>

### Your question

Hi,

I’m running Stalwart 0.16.25 (Docker) for a small office. Users keep getting rejected on IMAP with:

Concurrent request limit reached (limit.concurrent-request) listenerId = “imaps”

maxConcurrent in Settings › Network › IMAP is set to 64, but the number of connections actually open per account seems much lower. In the log (DEBUG, about 8 hours, anonymized [Filebin | yq6e4o8z3ftfumvx](https://filebin.net/yq6e4o8z3ftfumvx)) I counted at most around 9 simultaneous connections for one account, yet the limit kept triggering all night.

Two things I noticed:

The problem started after setting up an account in the iPhone’s Mail app. To resolve it, I need to restart Stalwart.

Between 01:03 and 01:15 the iPhone logged in successfully about 60 times per account, then got blocked again, even though those connections had already closed.

The Roundcube webmail (172.18.0.5) opened about 285 short sessions, all closed, and then started getting the same error at 05:58.

To me it looks like closed sessions are not always freed from the counter, but I’m not an expert, so I may be misreading the logs. A restart clears it temporarily.

Is this a known issue, or is there something I should change in my configuration?

Thanks!

### I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.

on

---

<div class="post-metadata">

### Author: ![helpbot](https://support.stalw.art/user_avatar/support.stalw.art/helpbot/32/13_2.png) [@helpbot](https://support.stalw.art/u/helpbot)
#### Post date: [October 13, 2026, 7:56am UTC](https://support.stalw.art/t/imap-concurrent-request-limit-reached-0-16-25/1926/2 "2026-10-13T07:56:57Z")

</div>

The limit you’re hitting is `maxConcurrent` on the IMAP singleton, which caps **simultaneous open IMAP/POP3 connections per account** , not “concurrent requests in the log at one moment.” Each open connection holds a slot until it is either cleanly logged out/closed _or_ reaped by the server’s idle timeouts (`timeoutAuthenticated`, default `30m`; `timeoutIdle`, default `30m` for IDLE). If a client (very commonly iOS Mail, which opens several parallel IMAP connections per account for INBOX, VIP, flagged, push-IDLE, etc., and is notorious for not sending a clean LOGOUT when the network changes or the app is backgrounded) drops off without closing the socket properly, the slot stays counted as in-flight until the idle timeout expires. That’s consistent with what you’re seeing: many short-lived sessions from Roundcube/iPhone accumulate against the same account’s limit faster than stale ones expire, so the account hits the ceiling well before the raw concurrent count in your log snapshot would suggest, and only a restart (which resets all limiter state) clears it.

Two concrete actions:

- Raise `maxConcurrent` for IMAP/POP3 (Settings › Network/Security › Rate Limits, IMAP/POP3 Concurrency) well above what a phone + webmail combination realistically needs, e.g. 32-64 is often too low for an iPhone’s Mail app with multiple mailboxes/push.
- Shorten `timeoutAuthenticated`/`timeoutIdle` on the Imap object slightly so stale/half-closed connections are reclaimed sooner rather than lingering for 30 minutes.

Docs: [Rate limiting | Stalwart](https://stalw.art/docs/email/settings/ratelimit) and [IMAP and POP3 | Stalwart](https://stalw.art/docs/email/settings/imap)

_This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong._

---

<div class="post-metadata">

### Author: ![trigg3r](https://support.stalw.art/letter_avatar_proxy/v4/letter/t/cc9497/32.png) [@trigg3r](https://support.stalw.art/u/trigg3r)
#### Post date: [October 13, 2026, 9:07am UTC](https://support.stalw.art/t/imap-concurrent-request-limit-reached-0-16-25/1926/3 "2026-10-13T09:07:45Z")

</div>

I don’t think idle timeouts explain it, though:

- maxConcurrent was already set to 64, with timeouts at their defaults (30m). I can raise it further, but the log shows only about 9 connections per account actually open when the limit triggered, so a higher value would probably just delay the block.

- In the attached log, all 179 iPhone sessions that logged in between 01:03 and 01:20 show imap.connection-end, all but one within a few minutes. Still, two accounts stayed blocked for about 5 hours (01:15 to 06:15), much longer than the 30-minute timeout.

So it looks like some slots are not freed even after the connection is closed, and only a restart clears them. Could someone from the team take a look?

---

<div class="post-metadata">

### Author: ![trigg3r](https://support.stalw.art/letter_avatar_proxy/v4/letter/t/cc9497/32.png) [@trigg3r](https://support.stalw.art/u/trigg3r)
#### Post date: [October 14, 2026, 7:44am UTC](https://support.stalw.art/t/imap-concurrent-request-limit-reached-0-16-25/1926/4 "2026-10-14T07:44:12Z")

</div>

With maxConcurrent disabled (empty field), the lock is not triggered. Since the logs indicate that the number of concurrent connections is consistently below 32 (whether counted by account or by IP …), this suggests that maxConcurrent is not being correctly reset when sessions close.

---

<div class="post-metadata">

### Author: ![stalwart](https://support.stalw.art/user_avatar/support.stalw.art/stalwart/32/12_2.png) [@stalwart](https://support.stalw.art/u/stalwart)
#### Post date: [October 15, 2026, 1:37pm UTC](https://support.stalw.art/t/imap-concurrent-request-limit-reached-0-16-25/1926/5 "2026-10-15T13:37:19Z")

</div>

Despite the name, that setting caps authenticated IMAP and POP3 connections per account, and your test with it cleared points at our side: some slots aren’t released when the session ends. A slot is held until everything belonging to the session has finished, and I suspect a command still trying to write to an iPhone that has gone to sleep keeps it alive after the connection is logged as closed. Leaving the field empty is a reasonable workaround until this is sorted out.

Next time an account is locked, please run `ss -tnp` (or `netstat -tnp`) inside the container and filter for port 993, so we can see whether sockets from the iPhone’s address are still ESTABLISHED or stuck in CLOSE\_WAIT. A raw IMAP trace (`imap.raw-input` and `imap.raw-output` at trace level) of one iPhone session that ends just before a lockout would also help. Is Docker’s userland proxy, or any other proxy, in front of port 993?
