Database connection exhaustion
Connection exhaustion means new work cannot get a database session. The queries underneath are often still fast. What runs out is a pool, a role limit, or a proxy that will not return a session it has already finished. The separating test is whether connection count tracks demand. A spike with flat traffic is a stuck session or an unbounded client, not load.
Decagon hit the stuck session while moving off Google Cloud's managed pooler onto self-managed PgBouncer. Voice requests stalled for exactly 300 seconds while Postgres finished the same queries in milliseconds, and the wedged checkouts exhausted SQLAlchemy's QueuePool for other work. SSL errors appeared only after Postgres killed those sessions. PgBouncer's pool was not full. After reading part of a split ParameterStatus packet, it returned to epoll() without checking for decrypted bytes still held by OpenSSL, and the session sat until Postgres ended it. A shorter application name kept the packet under the small-packet threshold. The upstream fix checks SSL_pending() before yielding to epoll().
Resend, from 10:19 PM UTC on February 15, 2026, matches the demand test without that bug. Idle connections lingered, and one misconfigured service rose from about 60 database connections to more than 330 with no matching traffic increase. Mail degraded rather than stopped, because sending tolerated an unavailable database, but most messages waited about two hours and the dashboard and non-email APIs were disrupted. Limits on the pool and on database roles restored service at 1:50 AM UTC.
Cases in this pattern
Applications
Resend outage on February 15, 2026: database connection exhaustion across mixed deployment patterns
Starting at 10:19 PM UTC on February 15, 2026, Resend experienced email sending delays and an inaccessible dashboard caused by database connection exhaustion. Idle connections were not released quickly enough under load, and one misconfigured service spiked from about 60 database connections to more than 330 without a matching traffic increase. Email delivery continued in a degraded state because the sending platform tolerated database unavailability, but most messages were delayed by roughly two hours and dashboard and non-email API operations were disrupted. Full recovery was reached at 1:50 AM UTC after connection pool and role-level database limits were tightened.Cloud Infrastructure
How Decagon debugged a latent PgBouncer bug across SQLAlchemy, OpenSSL, and epoll
During a migration from GCP's managed connection pooler to self-managed PgBouncer, voice requests began stalling for exactly 300 seconds while Postgres completed the same queries in milliseconds. The stalls caused SQLAlchemy QueuePool exhaustion on unrelated requests, and SSL errors appeared only after Postgres killed the wedged sessions. The root cause was a latent PgBouncer bug: after reading part of a split PostgreSQL ParameterStatus packet, PgBouncer returned to epoll() without checking whether OpenSSL still held decrypted bytes in its internal buffer, stalling the connection until PostgreSQL terminated the session.Databases / Background jobs
Intercom November 16, 2026 US outage: 6,269 redriven failed jobs ran an unindexed query and exhausted read replica connection pools
Between 19:06:30 and 19:34:30 UTC on November 16, 2026, all Intercom customers in the US region had a complete outage: Help Desk (Inbox, Messenger and Tickets), Fin, Fin Voice and email were unavailable for 28 minutes. The EU and AU regions were not affected. A background job that rebuilds call reporting data queried call records by date range without a matching index, so it scanned all of a large customer's records. Those slow jobs had been timing out and landing in a failed-jobs queue since 2023; by November 16, 6,269 had accumulated, and monitoring on that queue was disabled. At 19:04 the backlog was returned to the processing queue without a rate limit, and the burst of slow queries exhausted the connection pools on the key US MySQL read replicas within minutes. Intercom scaled the background fleet to zero at 19:33 and services recovered. No writes were interrupted or rolled back, and queued email was delivered.