{"id":"IL-0328","org":"CircleCI","date":"2021-11-08","docs":["https://status.circleci.com/incidents/47v961wr8clc"],"title":{"en":"A field type change in the database of CircleCI's job distribution service left all jobs stuck in \"not running\"","ko":"배포 뒤 CircleCI 의 모든 executor 에서 작업이 \"not running\" 상태로 멈췄다"},"domain":["database"],"impact":{"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":"CircleCI customers","region":"unknown"},"review":{"written_by":"session","reviewed_at":null,"reviewed_by":null},"lessons":null,"related":[],"sources":[{"url":"https://discuss.circleci.com/t/incident-report-november-8-2021-jobs-stuck-in-a-not-running-state/41890","kind":"blog","archived":"https://web.archive.org/web/20261101131016/https://discuss.circleci.com/t/incident-report-november-8-2021-jobs-stuck-in-a-not-running-state/41890"}],"summary":{"en":"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.\n\nTo 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.","ko":"CircleCI 의 실행 플랫폼으로 들어오는 모든 작업은 분배 서비스를 거쳐 알맞은 큐로 간다. 이 서비스는 PostgreSQL 데이터베이스와 스키마 검증으로 데이터를 관리한다. 분배 서비스는 처리할 작업을 찾다가 잘못된 데이터를 만나면 멈추고 처음부터 다시 시도한다.\n\nCircleCI 는 2021-11-08 18:50 UTC 에 분배 데이터베이스의 필드 타입을 바꾸는 배포를 내보냈다. 새로 들어온 작업은 새 타입의 데이터를 받았지만 배포 전부터 있던 작업은 분배에 실패했다. 팀은 곧바로 오류와 알림을 보고 변경을 롤백했다. 그러자 이번에는 두 배포 사이에 쓰인 데이터를 읽을 수 없어 분배가 계속 실패했다. 18:50 부터 19:43 까지 모든 executor 의 고객 작업이 \"not running\" 상태로 막혔다.\n\n팀은 분배 시스템이 그 필드를 무시하게 하는 수정을 빠르게 만들어 직접 배포했다. 그동안 몰려들 작업인 thundering herd 에 대비해 주 컴퓨트 클러스터를 직접 늘렸다. 늘린 새 노드가 예상보다 늦게 합류해 상당수가 unhealthy 로 표시되고 종료되면서 복구가 늦어졌다. Mac 을 포함한 machine executor 도 제공자의 속도 제한으로 늦게 프로비저닝됐다. Docker executor 가 먼저 회복했고, machine executor 의 긴 대기 시간은 20:19 UTC 까지 이어졌다. 큐가 줄어 정상 처리가 확인된 뒤 장애를 해결로 처리했다."},"trigger":{"en":"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.","ko":"18:50 UTC 에 분배 서비스의 PostgreSQL 데이터베이스에서 필드 타입을 바꾸는 배포를 내보냈다. 이 스키마 변경은 하위 호환되지 않았다."},"severity":"unknown","symptoms":["service-unavailable","high-latency","autoscaler-scale-up-failed","cloud-api-rate-limited"],"timeline":{"detected_after":null,"resolved_after":"1h 29m"},"date_kind":"incident","detection":{"en":"Errors and alerts related to the distribution failure appeared immediately after the 18:50 UTC deploy.","ko":"18:50 UTC 배포 직후 분배 실패와 관련된 오류와 알림이 바로 보였다."},"components":["database","node-pool"],"root_cause":"deploy-rollout","remediation":[{"text":{"en":"Rolled back the field type change, which did not clear the errors","ko":"오류와 알림을 보고 곧바로 변경을 롤백했다. 롤백 뒤에는 두 배포 사이에 쓰인 데이터를 읽지 못해 분배가 계속 실패했다."}},{"text":{"en":"Wrote, built and manually deployed a change that made the distribution system ignore the field","ko":"분배 시스템이 그 필드를 무시하게 하는 수정을 빠르게 만들고 빌드해 직접 배포했다."}},{"text":{"en":"Manually scaled the primary compute cluster for the expected thundering herd of work","ko":"몰려들 작업에 대비해 주 컴퓨트 클러스터를 직접 늘렸다. 이 수동 확장은 CircleCI 장애 대응 절차의 표준 단계다."}},{"text":{"en":"Monitored until processing was normal and resolved the incident","ko":"작업 큐가 줄어 정상 처리가 이어지는 것을 잠시 지켜본 뒤 장애를 해결로 처리했다."}}],"action_items":[{"text":{"en":"Fix the gaps found in the testing strategy","ko":"같은 장애가 다시 나지 않도록 테스트 전략의 빈틈을 찾아 고친다."}},{"text":{"en":"Change how the distributor reacts to unexpected data so that this kind of deploy should not affect all jobs","ko":"비슷한 배포가 시스템의 모든 작업에 영향을 주지 않도록, 분배 서비스가 예상하지 못한 데이터를 만났을 때의 동작을 바꾼다."}},{"text":{"en":"Make recovery faster when unforeseen failures occur","ko":"예상하지 못한 장애가 났을 때 더 빨리 복구할 수 있게 한다."}}],"contributing":["revert-did-not-restore","blast-radius-too-wide","test-coverage-gap"],"recurrence_of":null,"symptoms_text":{"en":"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.\n\nThe 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.\n\nDocker 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.","ko":"2021-11-08 18:50 UTC 배포 직후 오류와 알림이 바로 들어왔고, 모든 executor 에서 고객 작업이 \"not running\" 상태로 막혔다.\n\n오류 수 그래프에는 롤백 전후로 실패 상황이 뒤바뀐 모습이 보였다. 먼저 오류가 치솟고, 다른 작업에 의존하는 작업이 큐에 들어가지 못하면서 들어오는 작업이 줄었다. 롤백한 시점에 오류의 모양은 바뀌었지만 사라지지 않았고, 들어오는 작업은 천천히 계속 줄었다.\n\n롤백으로 해결하려 했지만, 두 배포 사이에 쓰인 데이터를 되돌린 코드가 읽지 못해 분배가 계속 실패했다.\n\n작업이 다시 흐르기 시작한 뒤에도 큐 대기 시간이 평소보다 오래 높았다. 주 컴퓨트 노드를 늘렸는데 새 노드가 예상보다 늦게 합류해 상당수가 unhealthy 로 표시되고 종료됐다. Mac 을 포함한 machine executor 는 제공자의 속도 제한으로 늦게 프로비저닝됐다. Docker executor 가 먼저 회복했고, machine executor 의 긴 대기 시간은 20:19 UTC 까지 이어졌다."},"updated_at":"2026-11-14T12:33:58.119230Z","url":"https://benchlet.com/incidentlib/app/cases/IL-0328","org_slug":"circleci"}