After upgrading livekit-agents from 1.5.8 → 1.6.4, our job processes started getting killed by the worker’s memory monitor with:
job process exceeded memory limit, killing it
This started appearing immediately after the upgrade was deployed (zero occurrences before it) and is recurring across every build since.
Memory grows steadily over the life of a single call until it crosses the limit.
Environment
- livekit-agents==1.6.4
- Python 3.12, Linux, running in Kubernetes
- Voice pipeline: STT → LLM → TTS, with Silero VAD (prewarmed per process) and a turn detector
Symptom / data from a killed job
memory_limit_mb: 1024
memory_warn_mb: 700
baseline_memory_mb: 564.5
growth_memory_mb: 479.9 ← grows over the call
memory_usage_mb: 1044.3 ← killed here
uptime: ~3800s
So the per-job process climbs ~480 MB above baseline over a single (long-running web) call and gets killed.
Worker config (AgentServer)
AgentServer(
…,
job_memory_warn_mb=700,
job_memory_limit_mb=1024,
load_threshold=0.9,
num_idle_processes=N,
)
These limits are unchanged from before the upgrade — memory usage rose to meet them, the ceiling didn’t drop.
What we’ve checked
- The memory-limit settings have been the same for a long time; only the livekit-agents version changed.
- The growth is per job process, not the worker or the shared inference process.
- This is reproducible on long calls and tracks with call duration.
Questions
- Are there any known per-job memory regressions / leaks in 1.6.4 vs 1.5.8 (session, audio I/O, chat context, or the inference path)?
- Is the growth expected behavior that we should accommodate by raising job_memory_limit_mb, or does it indicate something not being released
per turn? - Any recommended way to profile a single job process in 1.6.x to pinpoint where the growth accumulates?
Happy to share more logs or a minimal repro. Thanks!