5-12-10 15:02:56,040 - WARNING livekit.agents - Ru...
# ask-ai
r
2025-12-10 150256,040 - WARNING livekit.agents - Running <Task finished name='job_user_entrypoint' coro=<_JobProc._run_job_task.<locals>._traceable_entrypoint() done, defined at C:\Users\ASUS TUF\Desktop\works\123 livekit\.venv\Lib\site-packages\opentelemetry\util\_decorator.py:68> result=None> took too long: 4.52 seconds 2025-12-10 150258,186 - DEBUG comtypes._post_coinit.unknwn - Release <POINTER(IUnknown) ptr=0x210e9732390 at 210ea74b5d0> Process inference_proc: Traceback (most recent call last): File "C:\Users\ASUS TUF\AppData\Roaming\uv\python\cpython-3.12.9-windows-x86_64-none\Lib\asyncio\windows_events.py", line 462, in finish_socket_func return ov.getresult() ^^^^^^^^^^^^^^ OSError: [WinError 64] The specified network name is no longer available During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\ASUS TUF\Desktop\works\123 livekit\.venv\Lib\site-packages\livekit\agents\utils\aio\duplex_unix.py", line 57, in aclose await self._writer.wait_closed() File "C:\Users\ASUS TUF\AppData\Roaming\uv\python\cpython-3.12.9-windows-x86_64-none\Lib\asyncio\streams.py", line 364, in wait_closed await self._protocol._get_close_waiter(self) File "C:\Users\ASUS TUF\AppData\Roaming\uv\python\cpython-3.12.9-windows-x86_64-none\Lib\asyncio\proactor_events.py", line 286, in _loop_reading length = fut.result() ^^^^^^^^^^^^ File "C:\Users\ASUS TUF\AppData\Roaming\uv\python\cpython-3.12.9-windows-x86_64-none\Lib\asyncio\windows_events.py", line 803, in _poll value = callback(transferred, key, ov) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ASUS TUF\AppData\Roaming\uv\python\cpython-3.12.9-windows-x86_64-none\Lib\asyncio\windows_events.py", line 466, in finish_socket_func raise ConnectionResetError(*exc.args) ConnectionResetError: [WinError 64] The specified network name is no longer available The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Users\ASUS TUF\AppData\Roaming\uv\python\cpython-3.12.9-windows-x86_64-none\Lib\multiprocessing\process.py", line 314, in _bootstrap self.run() File "C:\Users\ASUS TUF\AppData\Roaming\uv\python\cpython-3.12.9-windows-x86_64-none\Lib\multiprocessing\process.py", line 108, in run self._target(*self._args, **self._kwargs) File "C:\Users\ASUS TUF\Desktop\works\123 livekit\.venv\Lib\site-packages\livekit\agents\ipc\inference_proc_lazy_main.py", line 63, in proc_main client.run() File "C:\Users\ASUS TUF\Desktop\works\123 livekit\.venv\Lib\site-packages\livekit\agents\ipc\proc_client.py", line 85, in run loop.run_until_complete(self._task) File "C:\Users\ASUS TUF\AppData\Roaming\uv\python\cpython-3.12.9-windows-x86_64-none\Lib\asyncio\base_events.py", line 691, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "C:\Users\ASUS TUF\Desktop\works\123 livekit\.venv\Lib\site-packages\livekit\agents\ipc\proc_client.py", line 161, in _monitor_task await self._acch.aclose() File "C:\Users\ASUS TUF\Desktop\works\123 livekit\.venv\Lib\site-packages\livekit\agents\utils\aio\duplex_unix.py", line 60, in aclose raise DuplexClosed() from e livekit.agents.utils.aio.duplex_unix.DuplexClosed
t
Thanks for reaching out, Av. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’ve reviewed the error trace you shared (WinError 64 → ConnectionResetError → DuplexClosed inside the inference_proc) and I’ll help you troubleshoot. I’ll address what’s happening, immediate changes you can make, and a few targeted questions so I can narrow the cause. What this log indicates • The IPC channel between the main agent process and the inference subprocess was closed unexpectedly, causing
DuplexClosed
. • The immediate low-level error is Windows OSError/ConnectionResetError: "[WinError 64] The specified network name is no longer available" while asyncio was performing socket/pipe I/O. • There’s also a warning that an agent task took ~4.5s, suggesting a blocking operation on the event loop that may contribute to instability. Actions you can try now (in order) 1. Force SelectorEventLoop on Windows (most likely fix) • Add at the very top of your main script before any asyncio code runs:
Copy code
import asyncio, sys
if sys.platform == "win32":
    asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
This avoids ProactorEventLoop/Proactor-related issues with multiprocessing + async pipes on Windows. 1. Move blocking work off the event loop • If your entrypoint or inference startup does heavy sync work (model loads, large file I/O, blocking libs), wrap it in
asyncio.to_thread()
or perform it during a prewarm step:
Copy code
await asyncio.to_thread(load_model, path)
1. Add early subprocess logging • Log at the start of your inference subprocess
proc_main()
to capture crashes during model load. That helps determine if the subprocess itself is faulting. 1. Check environment & resources • Ensure enough RAM/CPU for any models you load. Memory exhaustion can cause abrupt pipe closures. • Temporarily disable firewall/antivirus to rule out interference with IPC or sockets. 1. Test connectivity and versions • Confirm LiveKit server URL is reachable. • Upgrade
livekit-agents
and related toolchain if you’re not on a recent release. Targeted questions to narrow this down 1. Does this failure happen immediately on start, or after some runtime (minutes/hours)? 2. How are you launching the agent (script/CLI/Windows service)? Any special spawn options? 3. Which LiveKit Agents version are you running? 4. Do you load custom models/plugins in the inference_proc? If so, which and roughly how large (memory)? 5. Can you paste the minimal entrypoint function or the code that spawns/starts the inference_proc? If you prefer, paste a short snippet of your agent startup (entrypoint + how you spawn the process) and I’ll point to the exact lines to change. Sources: An open source stack for real-time multimodal AI | Firewall Tips | Job lifecycle | LiveKit docs | examples/survey | livekit/livekit_composite | DeepWiki | Events and error handling | LiveKit docs