Skip to content

BUG: Connection pool exhaustion under multi-account load #1172

@andrinoff

Description

@andrinoff

Describe the bug

Each fetcher path opens a fresh IMAP connection. With N accounts and concurrent folder list / refresh / IDLE / fetch operations, we open ~N×4 connections. Gmail caps at 15 per account; a few accounts with active TUI + daemon hit the cap and start getting auth-throttled.

Expected behavior

Bounded connection pool per account (see also FEAT #sibling for a configurable limit). Block / queue when at capacity.

Why it's hard

Fixing the leak isn't enough — we also need to handle the IDLE'd connection (which is unusable for normal ops) as a separate slot, and we need to surface 'pool exhausted' as an actual error path rather than letting requests pile up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions