I have observed in a few instances where my agent ...
# ask-ai
c
I have observed in a few instances where my agent process crashes. Has anyone observed a similar issue? Any help would be appreciated. This is happening in the production environment, which is affecting downstream pipelines that run on shutdown callback.
Copy code
{
    "message": "process is unresponsive, killing process",
    "level": "ERROR",
    "name": "livekit.agents",
    "pid": 6399,
    "job_id": "AJ_azLxwogwDbkX",
    "timestamp": "2025-11-01T19:15:59.852948+00:00"
}
{
    "message": "killing process",
    "level": "INFO",
    "name": "livekit.agents",
    "pid": 6399,
    "job_id": "AJ_azLxwogwDbkX",
    "timestamp": "2025-11-01T19:15:59.853379+00:00"
}
t
Thanks for reaching out, arpit. 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 encountering the error "process is unresponsive, killing process," which happens when LiveKit's agent supervision system notices that a worker process isn't responding to health check pings. This can be caused by a few things, such as: • High CPU load or memory pressure • Blocking operations in the agent code • Resource contention or network issues To help you get past this, here are some steps you might try: 1. Adjust the ping timeout and related settings in your worker configuration to give the process a bit more time to respond. 2. Take a look at your agent code to optimize it—avoiding blocking operations and handling exceptions smoothly can make a big difference. 3. Keep an eye on your resource usage, like CPU and memory, to make sure nothing’s getting overloaded. 4. Think about infrastructure upgrades, such as running multiple agent instances, setting up load balancing, or enabling auto-scaling to spread the load. 5. Set memory limits and warnings to keep resource usage in check before it becomes a problem. If you'd like, I’m here to guide you through adjusting these settings or helping with any other troubleshooting. Just let me know! Sources: livekit-agents/livekit/agents/ipc/proto.py | plugins/livekit/CHANGELOG.md | Job lifecycle | LiveKit Docs | Troubleshooting & Common Issues | livekit/livekit_composite | DeepWiki
c
Okay can you tell me more on the optimal settings ?
t
Here are some recommended optimal settings for your LiveKit agents that can help everything run smoothly: • Ping Timeout: The default is 60 seconds. If you’re working in high-latency environments or handling tasks that require a lot of computing power, it might be helpful to increase this value a bit to prevent any premature disconnections. Typically, the ping interval is 5 seconds, and the high ping threshold for inference processes is around 2.5 seconds. • Memory Limits: It’s a good idea to set a memory warning threshold (like 500 MB) and also configure a maximum memory limit for jobs if needed. For workloads that use a lot of memory, consider allocating enough memory—around 8 Gi works well for about 30 concurrent AI conversations. • Shutdown Process Timeout: The default here is 60 seconds. You’ll want to align this with your platform’s termination grace period (for example, 600 seconds if you’re using Kubernetes) so that shutdowns can happen gracefully. Also, the drain timeout, which defaults to 1800 seconds, controls how long current jobs have to finish when a worker is terminating. These settings can be adjusted depending on your specific workload and available resources. If you’d like, I’m here to help you configure these parameters to fit your needs perfectly. Just let me know! Sources: livekit-agents/livekit/agents/ipc/proc_pool.py | kubernetes/agent-manifest.yaml | Job lifecycle | LiveKit Docs | Worker options | LiveKit Docs | Deploying to custom environments | LiveKit Docs