v3.14.8 — cap LiteLLM container memory
The litellm service in docker-compose.yml had no mem_limit,
memswap_limit, or pids_limit — every other long-running service
in the stack had caps, but the LLM gateway itself was the one
gap. Container was drifting from ~800 MiB idle to 3+ GiB under
sustained load with no ceiling, eventually starving the host.
Added:
mem_limit: ${LITELLM_MEM_LIMIT:-4g}
memswap_limit: ${LITELLM_MEMSWAP_LIMIT:-8g}
pids_limit: ${LITELLM_PIDS_LIMIT:-512}
Sizing: 4 GiB matches 4 workers at ~1 GiB each plus master. Swap
at 2x mem matches convention. PIDs at 512 covers async workers
+ subprocesses.
Outcome: LiteLLM OOM-kills only itself under load and
auto-restarts. Host stays alive. Contained failure.
Full-stack sweep: every other long-running service has caps.
postgres-init (one-shot) is the sole remaining unbounded
container — negligible blast radius.