Code RoomStream consumer OOMKilled on restart
HardPrep Room Coding #2567

Stream consumer OOMKilled on restart

On-callAlgorithms & data structuresSenior–Staff~40 min

A stream-processing consumer (Kafka → transform → write to a slow downstream warehouse) starts growing RSS and eventually gets OOMKilled, then on restart immediately reprocesses a backlog and OOMs again — a crash loop. Dashboards show consumer lag climbing for hours, an in-memory work queue between the fetch stage and the write stage growing without bound, and downstream warehouse write latency up 5x after the warehouse began a maintenance/compaction window. Consumer fetch rate is unchanged. Triage and fix.

What a strong answer looks like

Stop the bleeding first (mitigate), then form hypotheses from real signals. Separate root cause from symptom, communicate status as you go, and close with what prevents a repeat.

0:00 of about 40 min
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.