Skip to content

Long-lived Aria SSE streams hold a pooled DB connection past the 20s leak threshold #58

Description

@HappyLiang12

Found during the skill/knowledge/workflow concurrency E2E effort (ledger: e2e-concurrency-report.md item O5; details: e2e-evidence/EVIDENCE-addendum.md).

While the full Playwright suite ran against the h2 profile, HikariCP logged 4x "Connection leak detection triggered" warnings (connection held longer than the 20s leak-detection-threshold). The occurrences correlate with the long-running Aria SSE specs (aria-conversation-id-regression ran 9.7 minutes; aria-engine-unification 5.5 minutes). The captured stack shows the connection acquired via JpaTransactionManager.doBegin for a @transactional entry point, i.e. a transaction (and its pooled connection) stays open for the lifetime of a streaming request.

Impact: with maximum-pool-size 8, a handful of concurrent long-lived SSE streams can exhaust the pool and starve unrelated requests (connection-timeout is 15s, so they would fail with SQLTransientConnectionException).

Suggested direction: keep transactions out of SSE/streaming request lifetimes - disable open-in-view if enabled, and scope @transactional to the short DB interactions inside the stream handler rather than the request entry point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions