Exit code 137 does not always mean an out-of-memory kill
Exit code 137 indicates the process received SIGKILL, which can come from the OOM killer but also from a failed liveness probe, a node drain, or a manual deletion. Before investigating a memory leak, check the last state in kubectl describe pod, where OOMKilled appears if memory exhaustion was the cause. Real memory leaks usually involve state that grows with each task and is never pruned, such as an unbounded dictionary, an LRU cache without a maxsize, or an in-memory event log. These patterns often pass review and short test runs, surfacing only after the pod has been running for days. The article cites a Celery memory growth issue in events/state.py, first reported in 2018 and fixed by maintainers in 2026, and describes a code-scanning tool, Tomosu, that flagged the unbounded growth before the fix, though the author notes it does not replace monitoring memory in production.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.



Discussion (0)
Log in to join the discussion and vote.
Log in