Hi, <@U01KZ61GV5Z>, <@U022KB72NFJ> <@U07SBJP6AJY> ...
# agents
o
Hi, @dry-elephant-14928, @boundless-energy-78552 @jolly-air-155 in LiveKit agent sometimes we get this logs
Copy code
2025-10-20T06:01:24.572319778Z stdout F {"message": "process memory usage is high", "level": "WARNING", "name": "livekit.agents", "memory_usage_mb": 703.51171875, "memory_warn_mb": 700, "memory_limit_mb": 1024, "pid": 21589, "job_id": "AJ_kwhrnNyD5VKV", "timestamp": "2025-10-20T06:01:24.572186+00:00"}
In out agent we set
"memory_warn_mb": 700, "memory_limit_mb": 1024,
and for some call
memory_limit_mb
exit and the full process terminate. Do you have any clue why an agent session could take > 1GB of memory? Thanks
w
I’m not affiliated, with this company, but i’m curious, can you tell more about your workload, machine, plugins and whatnot
maybe they can deduce all that from the AJ_kwhrnNyD5VKV jobid, but otherwise would be nice to know what causes this
b
Similar issue on my agents https://livekit-users.slack.com/archives/C088ZNU7QQ5/p1760692810388129 It terminates If I add ‘Multilingual’ model usage with English model.
r
How can I reproduce this? Can you modify basic_agent.py and provide reproducible steps?
s
same issue
b
Hi folks, Getting the same warning constantly. Do we have any answer to this? Many people are asking the same on #ask-ai but it seems the only 'solution' is to increase the warning limit, which seems more like a patch. Would love to understand why this is happening. Screenshot from New Relic. These warnings come at a constant basis with or without calls happening. Below my config if it helps. Thanks a lot.
Copy code
Here my config if it helps:

### Speech-to-Text (STT) - With Plugin
- **Model:** `Deepgram nova-3`
- **Language set:** `en-US`
- **Endpoint:** `https://api.eu.deepgram.com/v1/listen` (Europe)
- **MIP Opt-Out:** `True` (Model Improvement Program disabled)

### Large Language Model (LLM) - With Livekit Inference
- **Model:** `gemini-2.5-flash`

### Text-to-Speech (TTS) - With Plugin
- **Model:** `ElevenLabs eleven_flash_v2`

### Voice Activity Detection (VAD)
- **Provider:** Silero
- **Configuration:** `silero.VAD.load()` 

### Turn Detection
- **Model:** `EnglishModel()` (English-only to match Deepgram)

### Session Features
- **Preemptive Generation:** `True` 

### Room Input Options
- **Noise Cancellation:** `BVC()` 

### First Greeting
- **Message:** "Hi, this is XXX from YYY Support. What can I help you with today?"
- **Manual Send:** Yes (sent via `session.say()`)
m
Has anyone found anything to do with this? Is the solution to just not use features such as BVC?
b
@refined-appointment-81829? 🙂 Tagging in case this slipped. Let me know if we should open a new thread
j
if the ram usage is not increasing (which might be memory leak), you can increase the
job_memory_warn_mb
for the AgentServer to avoid this warning. or if you are asking why it’s using that many RAM, it will be helpful if you can provide an example that can reproduce the issue.
m
@jolly-air-155 can you help me understand how memory utilization works? For example, I have various paths that a user can go through depending on the language they speak, whether they are using a web app or a telephone, etc. In order to serve those, we change between using features such as • EOU multlingual vs EOU english • NC, BVC, or BVCTelephony Do those features use up memory if they are just sitting there, not being used? Or is it because I included those in my agent code, they have memory allocated to them no matter what?
r
First off we recommend you run
EOU multlingual
instead of
EOU english
. I expect you are prewarming some of this in which case it will be used. If you have at least one session using EOU you should seem the turn model memory usage too.
👍 2
s
@refined-appointment-81829 at some point I saw in GH the concept of prewarming LLMs?is this already possible in livekit? Can anything beyond the turn detection model be prewarmed?
r
LLM is not current available for prewarm but team is looking into it.
s
and TTS/STT?
e
I have loaded some models from hugging face for some realtime processing and i was kind of expecting this, for now i just increased the warn limit from 500mb to 2gbs. Here's how you do it
Copy code
if __name__ == "__main__":
    agents.cli.run_app(
        agents.WorkerOptions(
            entrypoint_fnc=browser_agent_entrypoint, prewarm_fnc=prewarm,
            job_memory_warn_mb=2000
        )
    )