IncidentPaged 18:02 UTC, Tuesday (14th restart this week)
OOM-killed every 16 hours — telemetry buffer grew to 2 GB
Service: background-worker (Python, systemd-managed)
Symptom: Worker RSS climbs from 240 MB at boot to 2.1 GB over ~16 hours, then OOM-killed. systemd restarts. Cycle repeats. No request-handler leak found in heap dumps.
The code that's running in prod
# telemetry.py
# Background telemetry buffer — accumulates events from every
# request and flushes to an external ingestion endpoint every 60s.
import threading
import time
import requests
_buffer: list = []
_lock = threading.Lock()
def record_event(event):
"""Called from every request handler."""
with _lock:
_buffer.append(event)
def flush_loop():
"""Background thread: ship the buffer every 60 seconds."""
while True:
time.sleep(60)
with _lock:
if not _buffer:
continue
batch = list(_buffer)
try:
requests.post(
"https://telemetry.example.com/ingest",
json=batch,
timeout=5,
)
with _lock:
_buffer.clear()
except Exception:
pass # try again on the next cycle
Log dashboard (last 60 seconds)
Pick the root cause
Four candidates. Three are plausible but mistake symptom for cause. Pick what you'd write in the postmortem timeline.