Cases1 case
1 to 1 of 1
IL-0498Clerk's Postgres database had load spikes every 15 minutes and requests failed and slowed intermittently for four daysClerk2025- Symptoms
At 13:08 UTC on 15 September 2025, Clerk's internal monitoring alerted on significant request failures and increased latency. Over the following days the request failures and latency spikes kept coming back while the Postgres database stayed unhealthy, with repeated spikes in database load.
- Trigger
At 05:30 UTC on 14 September 2025 the cloud provider automatically upgraded Clerk's Postgres database to a new minor version, which changed how Postgres handled connection locks.
- Root cause
- Component
- Contributing factor
- Detection
Internal monitoring alerted on significant request failures and increased latency at 13:08 UTC on 15 September. Shortly after the upgrade on 14 September it had already shown an increased but still acceptable database load.
- Remediation
- Optimised several expensive queries, refined critical indexes and re-indexed the database
- Blocked abusive traffic more aggressively for a time
- Performed a manual minor version upgrade and increased database capacity
- Added jitter to the connection pooling configuration so connections no longer recycled in step
- Action items
- Evaluate other database providers that give more control over upgrades and downgrades
- Isolate more services from each other, for example Sign Up and Sign In infrastructure from the rest of the system
- Keep optimising the most costly database queries
- Evaluate sharding and multi-tenant infrastructure to isolate one application from others
- Lessons
Clerk's review found that connection metrics sampled every 60 seconds could not show a recycling pattern that lasted seconds and repeated every 15 minutes, that an attack and background jobs with similar periods pulled attention away from the database layer, that the Backend API looked healthy only because it manages far fewer connections, and that the release freeze removed the staggering of connection creation that normal deploys provide.
This case involves Database and Database proxy and connection pooler. kubegap audits a Kubernetes cluster for gaps like these, read-only, from Claude Code or Codex; its checks cite public reports like the ones in this library.
By root cause1
Breaking change in an upgrade1 case
- Contributing factor
- Organisation