Skip to content

[P1][bug] Pool exhaustion (per-profile pool_max=5 default) surfaces opaquely; no UI for live pool stats (FR-1.2.3) #279

Description

@EVWorth

Context

DESIGN_REQUIREMENTS §FR-1.2.3: "Configurable pool size (default: 5, max: 50) per connection profile… pool statistics visible in status bar".

Problem

UI hard-caps pool at 5 (no 50 ceiling). With 11 active profiles at pool_max=5, the 11th connect triggers acquire_timeout, surfacing as Failed to connect: pool timed out while waiting for an open connection — opaque. No UI for live pool stats; pool statistics visible in status bar is unmet.

Files

  • src-tauri/crates/mas-core/src/connection/manager.rs:60-77
  • src/components/connection/ConnectionDialog.tsx:34-35, 487-499
  • src/components/layout/StatusBar.tsx (no pool stats surface)

Repro

Connect 11 profiles with pool_max=5 against a MySQL with max_connections=100. The 11th connect returns generic pool-timeout error.

Expected

The 11th returns a clear error referencing pool capacity, and StatusBar shows live idle/in_use/max per connection on hover.

Proposed fix

Scope M. Add ConnectionManager::pool_stats() returning [(connection_id, {in_use, idle, max})]. Expose via get_pool_stats Tauri command. Render hover tooltip in StatusBar.tsx. Optionally add a global ceiling in connect.

Acceptance

Live pool stats render in StatusBar; 11th connect error mentions pool capacity by name.

Needs human verify

Yes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/connectionAudit areaauditTracks a feature-by-feature codebase audit findingkind/bugAudit finding categorykind/doc-driftAudit finding categoryseverity/p1Audit finding severity

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions