{"id":"IL-0335","org":"Stack Exchange","date":"2017-01-24","docs":[],"title":{"en":"A bugcheck in the primary SQL Server put the Stack Exchange network into read-only mode and then offline for 12 minutes","ko":"주 SQL Server 의 bugcheck 로 Stack Exchange 네트워크가 읽기 전용이 됐다가 12분 동안 내려갔다"},"domain":["database"],"impact":{"scope":"The Stack Exchange network, including Stack Overflow, read-only for about 5 minutes and then offline for 12 minutes; about 3.5 seconds of uncommitted transactions may have been lost","users":"unknown","region":"unknown"},"review":{"written_by":"session","reviewed_at":null,"reviewed_by":null},"lessons":null,"related":[],"sources":[{"url":"https://stackstatus.net/post/156407746074/outage-postmortem-january-24-2017","kind":"official-status","archived":"https://web.archive.org/web/20220928194311/https://www.stackstatus.net/post/156407746074/outage-postmortem-january-24-2017"}],"summary":{"en":"A bugcheck in the SQL Server process on the primary NY-SQL02 first put it into a read-only state. Stack Exchange relies on application-level logic, not automatic SQL Server failover, to keep the sites online by querying the standby SQL servers read-only, but a bug had disabled that logic, so Stack Overflow and the rest of the network went fully offline. Restarting the SQL service on NY-SQL02 brought the network back in read-only mode, and after a sanity check of the SQL server's health the sites were put back into read-write mode, about 10 minutes after the source was found. About 3.5 seconds of uncommitted transactions were rolled back. The reason for the bugcheck was not known when the postmortem was written, but logs pointed to a possibly bad DIMM. Given the server's 384GB of memory, the team brought the network back online instead of waiting for the memory dump to complete. NY-SQL02 was then taken out of production for tests including a memory test, NY-SQL01 took all of the normal load, and the SQL cluster was brought up to 2016 SP1 CU1.","ko":"2017년 1월 24일 17:53 UTC 에 Stack Exchange 의 주 SQL Server 인 NY-SQL02 에서 SQL Server 프로세스가 bugcheck 를 일으켰고, 서버는 먼저 읽기 전용 상태가 됐다. Stack Exchange 는 SQL Server 의 자동 장애 조치를 허용하지 않는다. 대신 애플리케이션이 대기 SQL 서버에 읽기 전용으로 질의해 사이트를 살려 두는 방식을 쓴다. 하지만 버그 때문에 애플리케이션 수준의 장애 조치가 꺼져 있어서, 주 서버가 실패하자 Stack Overflow 와 나머지 Stack Exchange 네트워크가 완전히 내려갔다. 네트워크는 약 5분 동안 읽기 전용이었고 그 뒤 12분 동안 내려가 있었다.\n\nNY-SQL02 의 SQL 서비스를 재시작하자 네트워크가 읽기 전용으로 돌아왔다. 팀은 SQL 상태를 점검한 뒤 사이트를 읽기·쓰기 모드로 되돌렸다. 메모리가 384GB 라서 메모리 덤프가 끝나기를 기다리지 않고 네트워크를 먼저 살렸다. 커밋되지 않은 트랜잭션이 롤백되면서 약 3.5초 분량의 데이터가 사라졌을 수 있다. 글을 쓴 시점에는 bugcheck 의 원인을 몰랐다. 로그는 불량 DIMM 가능성을 가리켰다. NY-SQL02 는 운영에서 빼 메모리 시험을 포함한 점검에 들어갔다. 평소 부하는 모두 NY-SQL01 이 받았다. 이 기회에 SQL 클러스터를 2016 SP1 CU1 로 올렸다."},"trigger":{"en":"At 17:53 UTC the primary SQL Server, NY-SQL02, triggered a bugcheck in the SQL Server process.","ko":"주 SQL Server 인 NY-SQL02 에서 SQL Server 프로세스가 bugcheck 를 일으켰다."},"severity":"unknown","symptoms":["writes-rejected","service-unavailable","failover-failed","data-loss"],"timeline":{"detected_after":"2m","resolved_after":"17m"},"date_kind":"incident","detection":null,"components":["database"],"root_cause":"unknown","remediation":[{"text":{"en":"Restarted the SQL service on NY-SQL02, which brought the network back online in read-only mode","ko":"NY-SQL02 의 SQL 서비스를 재시작해 네트워크를 읽기 전용으로 되살렸다."}},{"text":{"en":"Put the sites back into read-write mode after a sanity check of SQL health","ko":"SQL 상태를 점검한 뒤 사이트를 읽기·쓰기 모드로 되돌렸다."}},{"text":{"en":"Brought the network online without waiting for the memory dump to complete","ko":"메모리가 384GB 라서 메모리 덤프가 끝나기를 기다리지 않고 네트워크를 먼저 살렸다."}},{"text":{"en":"Took NY-SQL02 out of production for testing, including a memory test, and ran the normal load on NY-SQL01","ko":"NY-SQL02 를 운영에서 빼 메모리 시험을 포함한 점검에 들어갔다. 평소 부하는 모두 NY-SQL01 이 받게 했다."}},{"text":{"en":"Brought the SQL cluster up to 2016 SP1 CU1","ko":"이 기회에 SQL 클러스터를 2016 SP1 CU1 로 올렸다."}}],"action_items":[],"contributing":["single-point-of-failure"],"recurrence_of":null,"symptoms_text":{"en":"On January 24, 2017 at 17:53 UTC the Stack Exchange network, including Stack Overflow, went into read-only mode for about 5 minutes and then went offline for 12 minutes. It took the team 2 minutes to notice the problem, 5 minutes to locate its source and 10 minutes to restore service.\n\nThe primary SQL Server, NY-SQL02, triggered a bugcheck in the SQL Server process, which first left it read-only. Stack Exchange does not allow automatic SQL Server failovers; application logic is meant to keep the sites up by reading from the standby SQL servers in read-only mode. A bug had disabled that application-level failover, so when the primary failed the whole network went offline. About 3.5 seconds of uncommitted transactions were rolled back and may have been lost.","ko":"2017년 1월 24일 17:53 UTC 부터 Stack Exchange 네트워크가 약 5분 동안 읽기 전용으로 동작했다. 그 뒤 Stack Overflow 를 포함한 사이트 전체가 12분 동안 내려갔다.\n\n주 SQL Server 인 NY-SQL02 에서 SQL Server 프로세스가 bugcheck 를 일으켰고, 처음에는 이 서버가 읽기 전용 상태가 됐다. Stack Exchange 는 SQL Server 의 자동 장애 조치를 쓰지 않는다. 대신 주 서버가 실패하면 애플리케이션이 대기 SQL 서버에 읽기 전용으로 질의해 사이트를 살려 두게 해 왔다. 그런데 버그 때문에 이 애플리케이션 수준의 장애 조치가 꺼져 있었다. 그래서 주 서버가 실패하자 사이트가 완전히 내려갔다.\n\n문제를 알아채는 데 2분, 문제가 어디서 왔는지 찾는 데 5분, 서비스를 되살리는 데 10분이 걸렸다. 커밋되지 않은 트랜잭션이 롤백되면서 약 3.5초 분량의 데이터가 사라졌을 수 있다."},"updated_at":"2026-11-14T12:33:59.010417Z","url":"https://benchlet.com/incidentlib/app/cases/IL-0335","org_slug":"stack-exchange"}