IL-0327 CircleCI · 2025-04-03database
After a blue/green upgrade of CircleCI's workflows database every query hit disk, and workflow starts lagged or failed
Around 22:00 UTC CircleCI started an upgrade of the database for the service that runs workflows, using a blue/green deployment. The analyze operation that rebuilds the database's statistics table, which the database uses for its indexes, had been run too early in the procedure, and a second major version upgrade within the same deployment made those statistics stale. After the cutover at 22:08, every query on the new database went to disk, the workflows service slowed, and jobs whose database calls exhausted their 10-minute retries were dropped. Upsizing the database, disabling non business critical operations and scaling the workflows service to one pod while the statistics were rebuilt did not help, so at 23:19 the team re-enabled writes on the old database and restored it as primary, which was complete at 23:29. The workflows queue was back to normal levels at 23:45 with no further errors. The root cause was found in the investigation after the incident.
- Severity
- –
- Scope
- Starting and cancelling workflows and jobs had increased latency and some failures, and workflows were slow or hard to view in the UI, from 22:08 to 23:45 UTC
- Users affected
- CircleCI customers
- Region
- –
- Time to detect
- 9m
- Time to resolve
- 1h 37m
Symptoms
On April 3, 2025, from 22:08 to 23:45 UTC, CircleCI customers saw higher latency and some failures when starting and cancelling workflows and jobs, and had delays and trouble viewing workflows in the UI. Nine minutes after the blue/green cutover of the workflows database, the team found increased latency in the workflows service and errors from jobs dropped after using up their 10 minutes of retries.
The team had expected a delay of less than 90 seconds during the database upgrade, with database calls from the workflows service sent to a queue and retried over 10 minutes, and expected the queues to grow a little. At 22:08 the blue/green deployment was complete and queries were verified as being served. At 22:30 the team restarted the workflows pods to make sure all of them were connected to the correct database, and a public incident was declared at 22:35.
At 22:41 the team saw that all queries on the new database were hitting disk, a sign that the database statistics tables had not been updated. Upsizing the database, disabling all non business critical operations on it and, at 23:00, scaling the workflows service down to a single pod to let the database recover while the statistics table was rebuilt did not improve database performance by 23:10; the workflows queue only backed up, as expected with fewer pods.
Root cause
Root cause Faulty deployment
- Trigger
- A blue/green upgrade of the database behind the CircleCI workflows service cut over to the new database at 22:08 UTC.
Detection
At 22:17 UTC the team identified increased latency in the workflows service and errors from jobs dropped after exhausting their 10-minute retries.
Remediation
- Restarted the workflows pods so all of them connected to the correct database
- Upsized the new database and disabled non business critical operations on it
- Scaled the workflows service down to a single pod while the statistics table was rebuilt
- Re-enabled writes on the old database and restored it as primary
Action items
- Run an analysis procedure after every major version change in blue/green database deployments
- Tested running analyze on a database under pressure, found it does not degrade performance further, and noted this for future remediation
- Add automated tests and manual checkpoints throughout migrations to catch problems before the blue/green cutover
Lessons
–
Sources
- https://discuss.circleci.com/t/post-incident-report-april-4-2025-delays-in-starting-workflows/53113 · blog · archived copy
References
Related cases
IL-0356Every domain hosted on Railway returned HTTP 404 to new connections for five minutes because route lookups failedRailway · 2026same root cause · shared Database
IL-0136A deployment that cleared an internal service's caches at peak traffic sent 20 times the normal load to the Azure OpenAI metadata backend in Sweden Central, and health checks that depended on its database restarted instances in a loop for almost six hoursMicrosoft Azure · 2026same root cause · shared Database
IL-0570Dropping an unused MySQL table stalled queries on its busy parent table and crowdworks.jp was hard to reach for a minuteCrowdWorks · 2026same root cause · shared Database
IL-0510MIT Learn's RDS PostgreSQL ran out of storage after a release and learn.mit.edu returned 503s and 504s for hoursMIT Open Learning · 2026same root cause · shared Database
IL-0380A compaction change in InfluxDB Cloud us-east-1 dropped data from compacted files, and queries missed data for weeksInfluxData · 2026same root cause · shared Database
IL-0369Railway's backend API went down when a column migration waited on locks and replicas could not get database connectionsRailway · 2025same root cause · shared Database
IL-0547Buildkite annotation queries timed out and drove database CPU up across shards after a migration removed an indexBuildkite · 2025same root cause · shared Database
IL-0315Railway's backend API went down when an index build locked a billion-row Postgres table and used up every connectionRailway · 2025same root cause · shared Database
IL-0324Three MediaWiki deployments lost Memcached after a PHP 8.1 rollout and overloaded the External Storage database clusterWikimedia Foundation · 2025same root cause · shared Database
IL-0307Supabase's Postgres connection pooler Supavisor 2.0 dropped connections for about 80% of us-east-1 tenantsSupabase · 2025same root cause · shared Database
IL-0552CircleCI's archival database ran out of storage, slowing workflow and job starts and the display of workflows in the UICircleCI · 2025same root cause · shared Database
IL-0554A database migration used up Sentry US's Postgres connections, and the site and event ingestion were down for 22 minutesSentry · 2024same root cause · shared Database
IL-0571STORES reservation returned bursts of 504 errors when a smart-list query held a database process for over 20 minutesSTORES · 2024same root cause · shared Database
IL-0293Cloud Bigtable in us-central1 had higher latency and connection errors for about 32 hours from low-rate packet lossGoogle Cloud · 2023same root cause · shared Database
IL-0523TANF-app production deployments were blocked for two months when a search-index migration ran out of database disk spaceU.S. Department of Health and Human Services · 2023same root cause · shared Database
IL-0567Aurora MySQL behind Cookie Run: OvenBreak hit 100% CPU after a sales-ranking feature launch, and players could not playDevsisters · 2023same root cause · shared Database
IL-0483Replicate's website and API returned slow responses and HTTP 500s for two hours as PostgreSQL connections ran outReplicate · 2023same root cause · shared Database
IL-0371Half of new connections to Render Postgres databases with point-in-time recovery failed while their backup jobs ranRender · 2023same root cause · shared Database
IL-0524An index migration locked Open Collective's whole Transactions table and degraded the service for nearly an hourOpen Collective · 2023same root cause · shared Database
IL-0328A field type change in the database of CircleCI's job distribution service left all jobs stuck in "not running"CircleCI · 2021same root cause · shared Database
IL-0566Hot ranges after a Cookie Run: Kingdom guild update drove CockroachDB nodes to 100% CPU, forcing emergency maintenanceDevsisters · 2021same root cause · shared Database
IL-0391GoCardless API requests timed out for about 15 seconds while a Postgres migration waited for an AccessExclusive lockGoCardless · 2015same root cause · shared Database
Check your cluster for this
For AI tools and scripts
- This case as JSON: https://incidentlib-api.benchlet.com/cases/IL-0327
- The cases most like it: https://incidentlib-api.benchlet.com/cases/IL-0327/similar
- MCP server (Streamable HTTP, no key):
https://incidentlib-mcp.benchlet.com/mcp
The API needs no key. The MCP server offers search_incidents, get_incident, list_incidents, get_topic and vocab; both are explained on API and MCP.