dry-kite-68535
05/22/2026, 11:40 AMtall-airline-16756
05/22/2026, 11:40 AMtall-airline-16756
05/22/2026, 11:41 AMdrain_timeout or autoscaling policy configured? (By default drain_timeout is 1800s / 30m.)
• Are there health check failures or resource limits (CPU/memory) in metrics around the restart times?
What I can do next once you provide those: review logs for health-check failures or crash reasons, check deployment/drain events, and suggest concrete fixes (adjust drain_timeout, fix failing health checks, address OOMs/crashes, or debug deployments).
Sources: Deployment reliability on LiveKit Cloud | LiveKit | Why is my Agent insights data missing? | LiveKit, with interactive elementsdry-kite-68535
05/22/2026, 11:42 AMtall-airline-16756
05/22/2026, 11:43 AMtimeout: 1800 (30m) but still began shutdown ~5 minutes later. That indicates an external trigger started the drain.
Likely causes
• A deployment or rollback/rolling update was triggered for that agent.
• The orchestration platform (Kubernetes, container service, autoscaler) initiated a restart due to health-check failures or policy.
• A wrapper/process supervisor is intercepting signals (SIGTERM) and not forwarding them, causing premature shutdown handling.
• A platform-level restart policy or automated job is cycling the instance.
Please provide these details so I can narrow it down
• Did you perform a deployment, rollback, or lk agent deploy around 11:22 UTC?
• Where is the agent running (LiveKit Cloud managed, Kubernetes, Docker, VM)? If Kubernetes, share the Deployment/Pod restart events or controller used.
• Can you fetch the platform/container logs or events around the same timestamp (112219) — e.g., kubelet, systemd, or container runtime messages?
• Is the agent behind any wrapper script or process supervisor? If so, does that script use exec to run the agent binary?
• Can you confirm the agent health-check endpoint is reachable from the platform (default health endpoint is on the agent at port 8081)?
What I can do next
• If you confirm a deployment/rollback, I’ll explain the rolling update behavior and safe settings.
• If it’s orchestration-related, I’ll guide you to check health-checks, restart events, and how to forward SIGTERM.
• If you paste the platform/container events around the shutdown time, I’ll analyze them and recommend concrete fixes (adjust health-checks, change drain_timeout, fix wrapper scripts, or update autoscaler rules).
Send the answers or the platform events/log lines and I’ll continue troubleshooting.
Sources: Deployment reliability on LiveKit Cloud | LiveKit | Server options | LiveKit Documentation, with interactive elementsdry-kite-68535
05/22/2026, 11:44 AMtall-airline-16756
05/22/2026, 11:45 AMdocker events --since "2026-05-22T11:15:00" --until "2026-05-22T11:30:00" (or equivalent) and paste relevant lines.
• Container restart reason: docker inspect --format '{{.State}}' <container-id> output.
• Agent health endpoint reachability: confirm curl -sS http://127.0.0.1:8081/ (or the container’s 8081) from inside the host; report the HTTP status or error.
• Docker restart policy or orchestrator: confirm if the container uses a restart policy (e.g., always, on-failure) or another supervisor. Share docker inspect <container-id> HostConfig.RestartPolicy.
• Resource constraints: any memory/CPU limits set for the container or host that might cause OOM kills — check dmesg for OOM or docker stats around the time.
• Wrapper script / PID 1: confirm the agent binary runs as PID 1 in the container (e.g., ps -o pid,cmd -p 1) and that you’re not using a shell script that doesn’t exec the agent.
Why these help
• Logs/events and inspect output will show whether Docker or the host initiated a restart (OOM, health check, restart policy).
• Health-check reachability can reveal orchestration-triggered restarts if the platform marks the container unhealthy.
If you paste the docker inspect output and any container events or dmesg OOM lines, I’ll analyze them and recommend exact fixes (adjust health-check, change restart policy, forward SIGTERM with exec, increase resources, or alter drain_timeout).
, with interactive elementsdry-kite-68535
05/22/2026, 11:48 AMtall-airline-16756
05/22/2026, 11:48 AMlk agent logs (or lk agent logs --id <agent-id>) to stream logs around the shutdown. Look for the draining worker lines and anything just before them.
1. Check agent status and recent events:
◦ Run: lk agent status and lk agent inspect --id <agent-id> to see current state, restart counts, and deployment info.
1. View build/runtime logs in the Cloud dashboard:
◦ Open the LiveKit Cloud dashboard → Projects → Agents → select your agent → Logs tab. Switch between Build and Runtime logs and copy relevant timestamps around the restart (112219).
1. Confirm health endpoint from the agent (if possible):
◦ Enable debug logs (LIVEKIT_LOG_LEVEL=DEBUG) or add a quick health-check request in your agent image that calls http://127.0.0.1:8081/ and prints the response to logs. Then redeploy and check runtime logs for the health-check result.
1. Check for automated deployments or CI:
◦ Verify no CI/CD pipeline or scheduled `lk agent deploy`/rollback is running repeatedly.
What I’ll do with those outputs
• If logs show a deployment/rollback trigger, I’ll explain the rolling update behavior.
• If logs show health-check failures, OOMs, or crashes, I’ll recommend specific fixes (adjust health-check, increase resources, forward SIGTERM with exec, or change restart policy).
Send the lk agent logs output and lk agent inspect results and I’ll analyze them.
Sources: Deployment reliability on LiveKit Cloud | LiveKit | Where to find your Agent Logs | LiveKit | Why is my Agent insights data missing? | LiveKit, with interactive elements