How can I disable or set threshold for these types...
# ask-ai
c
How can I disable or set threshold for these types of warnings? 2025-07-23 225408,139 - WARNING livekit.agents - process memory usage is high {“memory_usage_mb”: 518.03125, “memory_warn_mb”: 500, “memory_limit_mb”: 0, “pid”: 38175, “job_id”: “AJ_S8aouc3ecB2e”}
t
Thanks for reaching out, Vahid. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You can disable or configure the memory usage warnings in LiveKit by adjusting the memory threshold settings in your
WorkerOptions
configuration. For Python Agents:
Copy code
from livekit.agents import WorkerOptions

opts = WorkerOptions(
    entrypoint_fnc=your_entrypoint_function,
    job_memory_warn_mb=0,  # Set to 0 to disable warnings
    job_memory_limit_mb=0,  # Set to 0 to disable memory limits
)
For JavaScript/TypeScript Agents:
Copy code
const workerOptions = new WorkerOptions({
    agent: 'path/to/your/agent',
    jobMemoryWarnMB: 0,    // Set to 0 to disable warnings
    jobMemoryLimitMB: 0,   // Set to 0 to disable memory limits
});
Details: •
job_memory_warn_mb
(Python) or
jobMemoryWarnMB
(JavaScript): Memory warning threshold in MB. Set to
0
to disable warnings. •
job_memory_limit_mb
(Python) or
jobMemoryLimitMB
(JavaScript): Maximum memory usage for a job in MB. Set to
0
to disable memory limits. The memory monitoring system checks process memory usage every 5 seconds. If memory usage exceeds the warning threshold, a warning is logged. If it exceeds the limit (if set), the process is terminated. Sources: livekit-agents/livekit/agents/ipc/job_proc_executor.py | agents/src/worker.ts