[WARNING] livekit.agents: process memory usage is ...
# ask-ai
b
[WARNING] livekit.agents: process memory usage is high
t
Thanks for reaching out, Ahsan. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
It looks like you're seeing a warning about high process memory usage, which means that one of the supervised processes has gone over the set memory threshold. Don't worry—let's work through this together! Here are some helpful steps you can take: • First, take a look at the logs to get detailed info on the memory usage and see how it compares to the warning threshold. • If needed, you can adjust the memory thresholds. For Python-based agents, the
WorkerOptions
class lets you set
job_memory_warn_mb
(default is 500 MB) and
job_memory_limit_mb
(which is off by default). • Make sure your hosting environment has at least 8GB of RAM per worker, especially if you’re running memory-intensive tasks. • It’s also a good idea to review how memory is behaving at the system level and consider using monitoring tools like Prometheus to keep an eye on things. If you’d like, I’m here to help you dive into specific configurations or logs—just let me know! Sources: Development Tools | livekit/livekit_composite | DeepWiki | components/media_lib_sal/mem_trace/media_lib_mem_trace.c | pkg/stats/monitor.go | Operational Guidance | livekit/livekit_composite | DeepWiki | livekit-agents/livekit/agents/worker.py
b
How can I increase this limit
t
To help you increase the memory limit for a process, you can easily adjust the configuration settings like this: • If you’re working with Python-based agents, you can use the
WorkerOptions
class to set the
job_memory_limit_mb
parameter to the memory limit you need in megabytes. For example:
Copy code
WorkerOptions(job_memory_limit_mb=1024)  # Sets the limit to 1024 MB
• After making this change, just restart the agent to make sure the new limit takes effect. If you’d like, I’m here to guide you through the exact configuration or help with applying these changes—just let me know!