IL-0328 CircleCI · 2021-11-08database
A field type change in the database of CircleCI's job distribution service left all jobs stuck in "not running"
All work coming into CircleCI's execution platform goes through a distribution service that accepts requests to run a task and moves each task to the right queue, using a PostgreSQL database with schema validation. When the distributor finds bad data while looking for work, it stops and retries from the start, on the assumption that a retry will be enough. A deploy at 18:50 UTC changed a field type in that database; new work arrived with the new type, and work queued before the deploy made distribution fail. The team rolled the change back, but then the data written between the two deploys became unreadable and distribution kept failing. The team wrote, built and manually deployed a change that made the distribution system ignore the field.
To absorb the expected rush of queued work, the "thundering herd", the team manually scaled the primary compute cluster, a standard step in its incident process. New nodes took longer than expected to join, many were marked unhealthy and terminated, and machine executors including Mac were slowed by provider rate limiting, so recovery took longer than it should have. Queues drained over time, and after a period of monitoring with normal processing the incident was resolved. CircleCI found gaps in its testing strategy and said it would change how the distributor reacts to unexpected data so that such a deploy should not affect every job.
- Severity
- –
- Scope
- Customer jobs on all executors were blocked in a "not running" state from about 18:50 to 19:43 UTC, and queue times stayed longer than usual, particularly for machine executors, until 20:19 UTC
- Users affected
- CircleCI customers
- Region
- –
- Time to detect
- –
- Time to resolve
- 1h 29m
Symptoms
From about 18:50 to 19:43 UTC on Monday, November 8, 2021, CircleCI customer jobs on all executors were blocked in a "not running" state. Errors and alerts appeared right after a deploy that changed a field type in the database of the job distribution service.
The error count chart showed errors spiking first, then incoming work falling as jobs that depend on other jobs could not be queued. Rolling the change back did not clear the errors: they changed form but stayed, because the data written between the two deploys had become unreadable, and incoming work kept falling slowly. The distributor is built to stop when it finds bad data and to retry from the start.
Docker executors recovered first. After the fix, queue times stayed higher than usual for longer than expected, especially for machine executors, until 20:19 UTC. New nodes added to the primary compute fleet took longer than expected to join, and many were marked unhealthy and terminated, and machine executors, including Mac, were provisioned more slowly because of provider rate limiting.
Symptom Service outageHigh latencyScale-up failureCloud API rate limit exhausted
Root cause
Root cause Faulty deployment
- Trigger
- At 18:50 UTC a deploy changed the type of a field in the PostgreSQL database of the job distribution service, in a way that was not backwards compatible.
Detection
Errors and alerts related to the distribution failure appeared immediately after the 18:50 UTC deploy.
Remediation
- Rolled back the field type change, which did not clear the errors
- Wrote, built and manually deployed a change that made the distribution system ignore the field
- Manually scaled the primary compute cluster for the expected thundering herd of work
- Monitored until processing was normal and resolved the incident
Action items
- Fix the gaps found in the testing strategy
- Change how the distributor reacts to unexpected data so that this kind of deploy should not affect all jobs
- Make recovery faster when unforeseen failures occur
Lessons
–
Sources
- https://discuss.circleci.com/t/incident-report-november-8-2021-jobs-stuck-in-a-not-running-state/41890 · 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-0237A Kubernetes patch upgrade evicted every Ray Serve head and worker pod at once, and Lucidworks hosted LLMs went downLucidworks · 2026 · sev1same root cause · shared Node pool
IL-0166A compute host update removed the credential parser used to decode StackScripts, so new Linodes and every new LKE and LKE-E node failed to boot and autoscaling and node recycling failed in all regionsLinode · 2026same root cause · shared Node pool
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-0327After a blue/green upgrade of CircleCI's workflows database every query hit disk, and workflow starts lagged or failedCircleCI · 2025same root cause · shared Database
IL-0020During an EKS 1.30 upgrade the descheduler tried to reschedule every pod on the cordoned nodes at once and production workloads went downUK Ministry of Justice · 2025same root cause · shared Node pool
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-0163An API change that slipped through a gap in automated testing made LKE clusters resize to the wrong number of nodes and added billable worker nodes to customer accountsLinode · 2023same root cause · shared Node pool
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-0164An incremental Linode Kubernetes Engine production update that was missing changes from the previous release made cluster upgrades and node additions fail silentlyLinode · 2022same root cause · shared Node pool
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-0149Upgrades of AKS clusters on Virtual Machine Scale Sets failed with a 'platform image is not available' error after a service update left a backend service unhealthyMicrosoft Azure · 2019same root cause · shared Node pool
IL-0467Boskos crash-looped after a node drain started it from a buggy StatefulSet image, failing Kubernetes PR jobs for 9 hoursKubernetes project · 2019same root cause · shared Node pool
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-0328
- The cases most like it: https://incidentlib-api.benchlet.com/cases/IL-0328/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.