Skip to content

BUG: IMAP connection pool exhaustion under load #655

@andrinoff

Description

@andrinoff

Describe the bug: No connection pooling or limit on concurrent IMAP connections. Multiple operations can exhaust server connection limits. Server may refuse connections or ban client.

To reproduce:

  1. Configure multiple accounts (5+)
  2. Trigger simultaneous sync on all
  3. Each spawns multiple IMAP connections
  4. Server hits connection limit
  5. Errors: "too many connections" or connection refused

Expected behavior:

  • Implement connection pool with max limit
  • Queue operations when pool full
  • Reuse idle connections
  • Respect server connection limits
  • Graceful degradation on limit hit

Additional context:

  • File: fetcher/fetcher.go
  • Need connection pool implementation
  • Track connections per server
  • Handle connection reuse safely
  • Severity: High - service disruption
  • Complexity: High - connection pooling

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