Hi everyone, I'm running into a performance issue ...
# agents
c
Hi everyone, I'm running into a performance issue with my Python-based LiveKit voice agent and would appreciate any insights. Setup: • Framework:
livekit-agents
(Python) • Stack: Google STT, OpenAI LLM (
gpt-4o-mini
), and I've tried both OpenAI TTS and Google TTS. • Deployment: The agent is running on a GCP instance with 2GB of RAM. The Problem: The agent works perfectly for the first 4-5 minutes of a call. The conversation is responsive and near real-time. However, right around the 5-minute mark, the agent's performance begins to degrade significantly. Responses become very delayed, and eventually, the agent stops responding altogether. Key Log Observations: The logs show a clear pattern leading to the failure: 1. At the 5-minute mark, I see this log: DEBUG - flush audio emitter due to slow audio generation 2. Shortly after , the agent process is terminated by the worker: WARNING - process is unresponsive ERROR - process is unresponsive, killing process
e
@clever-bird-18768 Check the memory once you start the facing delay.
r
I agree with @elegant-glass-77462 that it sounds like a memory issue. Make sure you are not holding onto data that you do not need.