{"id":"IL-0554","org":"Sentry","date":"2024-10-10","docs":[],"title":{"en":"A database migration used up Sentry US's Postgres connections, and the site and event ingestion were down for 22 minutes","ko":"데이터베이스 마이그레이션의 긴 쿼리가 Postgres 커넥션을 고갈시켜 Sentry US 의 사이트와 수집이 22분 동안 멈췄다"},"domain":["database"],"impact":{"scope":"Sentry US dashboard, API and all US ingestion (errors, transactions, attachments, profiles, replays, spans, cron monitoring, custom metrics)","users":"unknown","region":"Sentry US"},"review":{"written_by":"session","reviewed_at":null,"reviewed_by":null},"lessons":null,"related":[],"sources":[{"url":"https://status.sentry.io/incidents/1b4n0vq8gl7q","kind":"official-status","archived":"https://web.archive.org/web/20250522125632/https://status.sentry.io/incidents/1b4n0vq8gl7q"}],"summary":{"en":"On 10 October 2024 a database migration in Sentry US ran certain operations through the RunSQL command. Sentry's systems lacked safety checks that would have caught missing lock and statement timeouts in the SQL being executed, so queries ran for a long time and used up the connections to the Postgres database. With its connections exhausted, the database became inaccessible, and the Sentry US site and ingestion were down from 3:42 PM to 4:04 PM PT. A fix was issued, after which the dashboard and ingestion recovered.","ko":"Sentry 는 데이터베이스 마이그레이션의 일부 작업을 RunSQL 명령으로 실행했다. 시스템에는 SQL 실행 중에 필요한 잠금 타임아웃과 구문 타임아웃이 빠진 것을 잡아내는 안전장치가 충분하지 않았다. 그 때문에 쿼리가 오래 돌면서 데이터베이스 커넥션을 고갈시켰다. 데이터베이스에 접근할 수 없게 되자 2024년 10월 10일 오후 3시 42분부터 4시 4분 PT까지 Sentry US 의 사이트와 이벤트 수집이 멈췄다. 수정을 적용한 뒤 대시보드와 수집이 회복했다."},"trigger":{"en":"A database migration ran certain database operations through the RunSQL command without lock and statement timeouts.","ko":"RunSQL 명령으로 실행한 데이터베이스 마이그레이션에 잠금 타임아웃과 구문 타임아웃이 걸려 있지 않아 쿼리가 오래 돌았다."},"severity":"unknown","symptoms":["service-unavailable","database-overloaded"],"timeline":{"detected_after":null,"resolved_after":"22m"},"date_kind":"incident","detection":null,"components":["database","schema-migration"],"root_cause":"deploy-rollout","remediation":[{"text":{"en":"Issued a fix, after which the dashboard and ingestion recovered","ko":"수정을 적용했고, 대시보드와 이벤트 수집이 회복하기 시작했다."}}],"action_items":[{"text":{"en":"Replace RunSQL commands with more robust solutions in the migration framework","ko":"마이그레이션 프레임워크 안의 더 견고한 방법으로 바꿔 RunSQL 명령을 아예 없앤다."}},{"text":{"en":"Update the database framework to the latest version, which handles some operations RunSQL was used for","ko":"데이터베이스 프레임워크를 최신 버전으로 올린다. 새 버전은 전에 RunSQL 로 하던 작업 일부를 직접 처리한다."}},{"text":{"en":"Write runbooks for recovering from lock or timeout issues during migrations","ko":"마이그레이션 중에 잠금이나 타임아웃 문제가 생겼을 때 복구를 안내하는 런북을 만들었다."}},{"text":{"en":"Improve alerting and observability so the team reacts sooner","ko":"더 빨리 대응하고 앞으로의 중단 시간을 줄이도록 알림과 관측 도구를 보강했다."}}],"contributing":["no-config-tests","no-runbook"],"recurrence_of":null,"symptoms_text":{"en":"From 3:42 PM to 4:04 PM PT on 10 October 2024, the Sentry US site and event ingestion were unavailable, and the status page reported an issue with the Postgres database that made the site unavailable. The dashboard, the API and every US ingestion type, including errors, transactions, attachments, profiles, replays, spans, cron monitoring and custom metrics, were affected.","ko":"2024년 10월 10일 오후 3시 42분부터 4시 4분 PT까지 Sentry US 의 사이트와 이벤트 수집을 모두 쓸 수 없었다. 상태 페이지는 Postgres 데이터베이스 문제로 사이트를 쓸 수 없다고 알렸다.\n\n영향은 대시보드, API, US 수집 전체에 미쳤다. 오류, 트랜잭션, 첨부 파일, 프로파일, 리플레이, 스팬 수집과 크론 모니터링, 베타 단계인 Custom Metrics 가 함께 멈췄다."},"updated_at":"2026-11-14T12:34:20.421445Z","url":"https://benchlet.com/incidentlib/app/cases/IL-0554","org_slug":"sentry"}