dazzling-hair-4049
12/04/2025, 4:28 AMdownload-files is already executed:
File "/app/.venv/lib/python3.13/site-packages/livekit/agents/ipc/proc_pool.py", line 171, in _proc_spawn_task
await proc.initialize()
File "/app/.venv/lib/python3.13/site-packages/livekit/agents/ipc/supervised_proc.py", line 198, in initialize
init_res = await asyncio.wait_for(
^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
)
^
File "/usr/local/lib/python3.13/asyncio/tasks.py", line 506, in wait_for
async with timeouts.timeout(timeout):
~~~~~~~~~~~~~~~~^^^^^^^^^
File "/usr/local/lib/python3.13/asyncio/timeouts.py", line 116, in __aexit__
raise TimeoutError from exc_valtall-airline-16756
12/04/2025, 4:28 AMtall-airline-16756
12/04/2025, 4:28 AMCPUCreditBalance) while starting the agent.
• Action: run on a dedicated compute instance (c5/c6i/m5) or enable t3.unlimited if staying on burstable.
2) Model files / cold start delay
• Ensure download-files actually placed model weights inside the running container/VM at the expected path and permissions are correct.
• Quick checks: inside the VM/container, list the model directory used by the agent and verify file sizes and timestamps. Also try a manual preload (or agent prewarm) so the model is loaded before initialize/run.
Short additional diagnostics I need from you to pinpoint this:
• Instance type (e.g., t3.medium, c6i.large, etc.) and whether it’s burstable.
• Output of CPU usage and throttling metrics during agent start (or whether you can reproduce while watching those).
• Confirmation the download-files command ran inside the same container/VM where the agent runs, and the path you expect models at.
If you’d like, tell me the instance type and the model path and I’ll suggest the next step (config changes, prewarm, or instance recommendation).
Sources: Troubleshooting Latency and Timeout Errors with Turn Detection on AWS | LiveKit turn detector plugin | LiveKit docs | Voice AI quickstart | LiveKit docs | Builds and Dockerfiles | LiveKit Docs | examples/survey | livekit/livekit_composite | DeepWikidazzling-hair-4049
12/04/2025, 4:31 AMtall-airline-16756
12/04/2025, 4:31 AMresources.requests and resources.limits (cpu, memory) for the agent pod.
• If limits are set and CPU is saturated, the container can be throttled; try increasing CPU requests/limits.
2) Node type and CPU consistency
• Tell me the node machine type (e.g., n1-standard-4, e2-medium, c2-series). Prefer non-burstable, compute-optimized machines for consistent inference performance.
3) How models are provided to the container
• Confirm whether download-files ran during the image build (recommended) or at runtime in the pod. If runtime, cold-start downloading can cause timeouts.
• Provide the model path inside the container and the files’ presence (ls -l <model_path> output).
4) Pod and node metrics to check
• Pod CPU usage and throttling (kubectl top pod, or Metrics Server/Prometheus graphs) during agent startup.
• Node CPU utilization and any OOM or throttling events in kubectl describe pod <pod> and kubectl logs.
5) Reproduce / quick mitigation steps
• Try increasing the pod CPU request/limit and redeploying to see if initialize succeeds.
• Prewarm or preload the model inside the container image (build-time download) to avoid runtime load.
• If possible, run the agent on a single dedicated node with higher CPU to test whether the timeout disappears.
If you share:
• the pod resource block from your Deployment/StatefulSet,
• node machine type,
• confirmation where models are downloaded (build vs runtime),
I’ll give the precise next commands and recommended resource values to resolve the TimeoutError.
Sources: Troubleshooting Latency and Timeout Errors with Turn Detection on AWS | Deploying to custom environments | LiveKit Docs | Builds and Dockerfiles | LiveKit Docs