billions-lawyer-8588
07/21/2025, 3:00 PMtall-airline-16756
07/21/2025, 3:00 PMtall-airline-16756
07/21/2025, 3:02 PMprocess exited with non-zero exit code -9 in a LiveKit agent running in a Kubernetes pod means the process was forcefully terminated, usually by a SIGKILL signal. This can be triggered by several mechanisms:
• Memory Limit Exceeded: The agent will kill itself if it exceeds the configured memory_limit_mb. Check if your pod is running out of memory and consider increasing the pod's memory allocation or optimizing memory usage.
• Process Unresponsiveness: If the agent doesn't respond to health checks (ping requests) within the ping_timeout period, it will be killed. Review if your agent is becoming unresponsive due to resource contention or heavy workloads.
• Initialization or Shutdown Timeout: If the agent fails to initialize or shut down within the configured timeouts (initialize_timeout or close_timeout), it will be forcefully killed.
• Kubernetes Resource Limits: If your pod exceeds its CPU or memory limits, Kubernetes itself may kill the process with a SIGKILL.
Recommended steps:
• Check your pod's memory and CPU usage to see if it's hitting resource limits.
• Review the agent logs immediately before the exit code -9 error for messages like "process exceeded memory limit, killing process" or "process is unresponsive, killing process" to identify the trigger.
• Consider increasing the pod's resource limits or adjusting the agent's memory_limit_mb, ping_timeout, initialize_timeout, or close_timeout settings if needed.
• Ensure your Kubernetes nodes have sufficient resources and are not under memory or CPU pressure.
Identifying the specific log message before the exit will help determine which condition caused the termination.
Sources: livekit-agents/livekit/agents/resources/__init__.py