able-garage-30380
08/29/2025, 2:08 PMTraceback (most recent call last):
File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
return await fut
^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/livekit/agents/ipc/channel.py", line 47, in arecv_message
return _read_message(await dplx.recv_bytes(), messages)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/livekit/agents/utils/aio/duplex_unix.py", line 35, in recv_bytes
len_bytes = await self._reader.readexactly(4)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/streams.py", line 752, in readexactly
await self._wait_for_data('readexactly')
File "/usr/local/lib/python3.12/asyncio/streams.py", line 545, in _wait_for_data
await self._waiter
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/livekit/agents/cli/_run.py", line 79, in _worker_run
await worker.run()
File "/usr/local/lib/python3.12/site-packages/livekit/agents/worker.py", line 403, in run
await self._inference_executor.initialize()
File "/usr/local/lib/python3.12/site-packages/livekit/agents/ipc/supervised_proc.py", line 169, in initialize
init_res = await asyncio.wait_for(
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/tasks.py", line 519, in wait_for
async with timeouts.timeout(timeout):
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/timeouts.py", line 115, in __aexit__
raise TimeoutError from exc_val
TimeoutError"
tall-airline-16756
08/29/2025, 2:08 PMtall-airline-16756
08/29/2025, 2:09 PMable-garage-30380
09/01/2025, 7:32 PMtall-airline-16756
09/01/2025, 7:33 PMinitialize_process_timeout
and other related timeout settings in your LiveKit agent configuration to give it a bit more time to get started.
• Check Resource Allocation: Make sure your Cloud Run service has enough CPU and memory. If it’s running low, that could cause timeouts or cancellations.
• Review Logs: Take a look at both the LiveKit agent logs and Cloud Run logs to spot any patterns, like container restarts or network hiccups, that might be linked to the errors.
• Connection Stability: Double-check that your Cloud Run environment supports stable, long-running WebSocket connections since these are super important for LiveKit agents.
• Startup Probe: Since the startup probe is passing, the problem might be happening after the agent starts. Keep an eye on the agent right after startup to catch anything unusual.
If you’re still running into trouble, feel free to share more logs or specific settings—happy to help dig in further!