DBRaven
Post-Mortem Framework · Capacity: Connection Pool Exhaustion Under Downstream Latency

Connection Pool Exhaustion Under Downstream Latency

SEV-2, Significant Impact

Feedback Loop propagation · capacity · Affects 0 scenario(s)

Severity Classification

Classified as CRITICAL based on failure mode severity. The feedback loop propagation pattern increases risk of broad impact beyond the initial failure point.

Propagation Chain

1

Origin component

Connection Pool Exhaustion Under Downstream Latency begins at the source component. Trigger: Downstream database experiencing slow query due to missing index, lock contention, or I/O saturation.

Immediate (T+0) · Signal: Queue Depth

2

Downstream dependents

Failure propagates to directly dependent components via synchronous calls or shared resources. Latency increases and error rates rise on affected dependencies.

30–120 seconds after pool exhaustion begins. The leading signal is pool wait queue depth increasing alongside downstream latency increase. Without pool-level metrics, the failure manifests as timeout errors at the application layer, detectable within 60 seconds via error rate monitoring. · Signal: Latency spike, connection timeout, or error rate increase on dependents

3

Downstream of dependents (fan-out)

Failure spreads to multiple downstream systems simultaneously. Retry storms may amplify load on the failing component.

Within minutes of initial failure · Signal: Multiple services reporting elevated error rates

4

Self-amplification loop

Retry behavior and back-pressure cause the failure to amplify. Resource exhaustion accelerates, the system cannot self-recover without intervention.

Minutes after fan-out · Signal: Cascading alert storms; all downstream indicators deteriorating

Blast Radius

Complete application unavailability for all requests requiring the affected downstream dependency. If a single database pool is shared across features, all features fail when the pool exhausts. Circuit breakers limit the blast radius to the specific feature making calls to the slow dependency, protecting unrelated features from pool exhaustion.

Contributing Factors

Trigger Condition: Downstream database experiencing slow query due to missing ioperational

This operational trigger enables Connection Pool Exhaustion Under Downstream Latency: Downstream database experiencing slow query due to missing index, lock contention, or I/O saturation

Trigger Condition: External API dependency experiencing elevated latency (thirdoperational

This operational trigger enables Connection Pool Exhaustion Under Downstream Latency: External API dependency experiencing elevated latency (third-party rate limiting, upstream GC pause)

Trigger Condition: Network congestion increasing round-trip time between applicoperational

This operational trigger enables Connection Pool Exhaustion Under Downstream Latency: Network congestion increasing round-trip time between application and database

Mitigation Gaps

MEDIUMKnown mitigator 'circuit_breaker' not in runbook

Add 'circuit breaker' to the runbook. Circuit breakers fast-fail requests when downstream latency is elevated, releasing connections back to the pool rather than holding them open for slow responses.

Remediation Plan

ImmediateIdentify the downstream dependency causing elevated latency from application met

Identify the downstream dependency causing elevated latency from application metrics

Effort: Minutes to hours (on-call response)

ImmediateImplement circuit breaker to stop new requests from reaching the slow dependency

Implement circuit breaker to stop new requests from reaching the slow dependency

Effort: Minutes to hours (on-call response)

ImmediateInvestigate downstream latency root cause (slow query, index, GC pause, network)

Investigate downstream latency root cause (slow query, index, GC pause, network)

Effort: Minutes to hours (on-call response)

Short-TermCircuit breaker on downstream dependency

Wrap all calls to the downstream with a circuit breaker. When the downstream error rate or latency exceeds a threshold, the circuit opens and fast-fails new requests without attempting the downstream call. Prevents pool exhaustion by releasing connections immediately rather than holding them for slow responses.

Effort: 1 day to 1 week

Short-TermConnection acquisition timeout

Set a short maximum wait time for acquiring a connection from the pool (e.g., 100ms). If a connection is not available within the timeout, fail fast with an error rather than queuing. This releases capacity for other requests while the pool is under pressure.

Effort: 1 day to 1 week

Short-TermDownstream latency alerting

Alert on downstream P95 latency increases before pool exhaustion occurs. An alert at downstream P95 = 100ms (normally 10ms) gives operators time to investigate and mitigate before the pool exhausts at 1000ms.

Effort: 1 day to 1 week

Short-TermAdd alerting for documented detection signals

Configure alerts for: queue depth, alert, error rate spike. Set thresholds to fire at 70% of critical level to allow response before full failure.

Effort: 1–3 days

Long-TermArchitecture review for Connection Pool Exhaustion Under Downstream Latency resilience

Conduct a structured architecture review focused on preventing recurrence. Review topology for blast radius reduction, mitigation coverage, and observability gaps. Consider whether the current architecture scenario should evolve.

Effort: 1–2 sprints

This post-mortem framework is derived from structured architecture knowledge. It provides an evidence-grounded starting point, not a substitute for a live incident review conducted by the team closest to the system. Adjust remediation priorities based on actual runtime observations.