{"id":"IL-0067","org":"BC Government","date":"2025-07-09","docs":[],"title":{"en":"Redis filled its persistent volume, corrupted its append-only file and crash-looped on every restart","ko":"Redis 마스터의 50Mi 영구 볼륨이 가득 차 AOF 가 깨졌고, Redis 파드가 크래시 루프에 빠져 Klamm 운영 서비스가 멈췄다"},"domain":["kubernetes"],"impact":{"scope":"Klamm production application and its dependent services; data on the Redis volume lost when the PVC was rebuilt","users":"unknown","region":"unknown"},"review":{"written_by":"session","reviewed_at":null,"reviewed_by":null},"lessons":null,"related":[],"sources":[{"url":"https://github.com/bcgov/klamm/wiki/Incident-Post%E2%80%90Mortem-Template","kind":"github","license":"unknown","archived":null}],"summary":{"en":"Klamm runs on OpenShift with a Redis cluster as its cache. On 9 July 2025 a Laravel worker produced a large I/O spike, which led to a surge of requests to Redis. Redis's append-only file, the log it writes every change to so it can rebuild its data after a restart, grew quickly and filled the persistent volume of the Redis master, whose storage limit request was 50Mi.\n\nWhen fsync of the AOF failed for lack of space, Redis could not write its buffered changes to disk and the process stopped, so the container crashed. The last writes to the AOF had not completed cleanly, which left the file corrupt. On each restart Redis tried to load the AOF to recover its data, could not parse it, and crashed again. With the cache down, queue workers timed out and the application went down.\n\nThe team backed off the StatefulSet and the deployment, deleted the corrupted PVC and rebuilt it, and restarted both. Rebuilding the PVC lost the data on it. OpenShift events from the incident were not retained.","ko":"bcgov GitHub 조직의 klamm 위키에 Klamm 팀이 남긴 Redis 캐시 장애 포스트모템이다. 포스트모템 양식을 일부만 채운 문서여서 장애 ID, 시작과 끝 시각, 시간순 기록, 교훈은 비어 있다. 심각도는 Critical 로 적혀 있다.\n\n2025년 7월 9일 Klamm Laravel 워커 하나에서 I/O 작업이 크게 늘면서 Redis 캐시 요청이 급증했다. Redis 마스터의 영구 볼륨은 스토리지 요청값이 50Mi 로 잡혀 있어 급격히 커지는 AOF 를 감당하지 못했고 곧 가득 찼다. Redis 는 fsync 로 버퍼에 쌓인 쓰기를 디스크에 내려 데이터를 보존한다. 디스크가 차서 fsync 가 실패하자 Redis 는 복구할 수 없는 상태가 되어 프로세스가 종료됐고, OpenShift 에서 Redis 컨테이너가 크래시했다.\n\n디스크가 가득 찬 상태에서 쓰기를 끝까지 마치지 못해 AOF 가 깨졌다. Redis 는 다시 시작할 때마다 이 AOF 를 읽어 데이터를 복구하려 했지만 \"invalid byte sequence\" 오류로 해석하지 못하고 다시 크래시했다. 파드는 크래시 루프에 빠져 준비 상태가 되지 못했다. 캐시가 오래 멈추자 큐 워커들이 타임아웃됐고, Redis 에 의존하는 서비스가 크게 영향을 받았다. 팀은 스테이트풀셋과 디플로이먼트를 멈추고, 깨진 PVC 를 지운 뒤 다시 만들고, 둘을 다시 시작해 복구했다. PVC 를 다시 만들면서 데이터를 잃었다. Klamm 운영 환경은 업무 시간 외에 약 30분 동안 완전히 멈췄다."},"trigger":{"en":"A large, unexpected spike in I/O from a Klamm Laravel worker sharply increased requests to the Redis cache.","ko":"Klamm Laravel 워커 하나에서 I/O 작업이 예상하지 못하게 급증해 Redis 캐시 요청이 크게 늘었고, AOF 가 빠르게 커지면서 Redis 마스터의 영구 볼륨을 채웠다."},"severity":"sev1","symptoms":["service-unavailable","crash-loop","volume-full"],"timeline":{"detected_after":null,"resolved_after":"30m"},"date_kind":"incident","detection":null,"components":["persistent-volume","cache"],"root_cause":"capacity","remediation":[{"text":{"en":"backed off the Redis StatefulSet and the deployment","ko":"Redis 스테이트풀셋과 디플로이먼트를 멈췄다."}},{"text":{"en":"deleted the corrupted PVC and rebuilt it","ko":"깨진 PVC 를 지우고 다시 만들었다. 이 과정에서 Redis 볼륨의 데이터를 잃었다."}},{"text":{"en":"restarted the StatefulSet and the deployment","ko":"스테이트풀셋과 디플로이먼트를 다시 시작했다."}}],"action_items":[{"text":{"en":"Increase the Klamm Redis cache volume to 100Mi","ko":"Klamm Redis 캐시 볼륨을 100Mi 로 늘린다."}},{"text":{"en":"Integrate Sysdig monitoring on the namespace","ko":"네임스페이스에 Sysdig 모니터링을 설정한다."}},{"text":{"en":"Enable replica pods on the Redis cluster","ko":"Redis 클러스터에서 레플리카 파드를 쓰도록 설정한다."}}],"contributing":["no-capacity-planning"],"recurrence_of":null,"symptoms_text":{"en":"The Klamm production application was completely unavailable for about 30 minutes outside working hours. Klamm's queue workers timed out because they could not reach the Redis cache, and the services that depend on it were badly affected.\n\nThe Redis master's logs showed \"Fail to fsync the AOF file: No space left on device\". After the Redis container stopped, every restart failed while loading the append-only file (AOF) with an \"invalid byte sequence\" error, and the pod kept crashing without becoming ready.","ko":"2025년 7월 9일 OpenShift 위의 Klamm 캐시 Redis 클러스터가 멈췄다. Redis 로그에는 \"Fail to fsync the AOF file: No space left on device\" 오류가 남았다. AOF 는 Redis 가 쓰기 명령을 차례로 덧붙여 저장하는 파일이다.\n\nRedis 컨테이너는 크래시한 뒤 다시 시작하며 AOF 를 읽으려 했지만 \"invalid byte sequence\" 오류로 파일을 해석하지 못했다. 컨테이너가 계속 크래시해 파드가 준비 상태가 되지 못했고, Redis 에 닿지 못한 큐 워커들이 타임아웃됐다. Klamm 운영 환경은 업무 시간 외에 약 30분 동안 완전히 멈췄다."},"updated_at":"2026-11-10T00:00:39.318582Z","url":"https://benchlet.com/incidentlib/app/cases/IL-0067","org_slug":"bc-government"}