dry-rainbow-66344
09/01/2025, 6:23 AMltilingual", "pid": 27848, "inference": true}
2025-09-01 06:23:22,205 - ERROR livekit.agents - worker failed
Traceback (most recent call last):
File "/root/.venv/lib/python3.13/site-packages/livekit/agents/utils/aio/duplex_unix.py", line 35, in recv_bytes
len_bytes = await self._reader.readexactly(4)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/asyncio/streams.py", line 767, in readexactly
raise exceptions.IncompleteReadError(incomplete, n)
asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of 4 expected bytes
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/root/.venv/lib/python3.13/site-packages/livekit/agents/cli/_run.py", line 79, in _worker_run
await worker.run()
File "/root/.venv/lib/python3.13/site-packages/livekit/agents/worker.py", line 403, in run
await self._inference_executor.initialize()
File "/root/.venv/lib/python3.13/site-packages/livekit/agents/ipc/supervised_proc.py", line 169, in initialize
init_res = await asyncio.wait_for(
^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
)
^
File "/usr/lib/python3.13/asyncio/tasks.py", line 507, in wait_for
return await fut
^^^^^^^^^
File "/root/.venv/lib/python3.13/site-packages/livekit/agents/ipc/channel.py", line 47, in arecv_message
return _read_message(await dplx.recv_bytes(), messages)
^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.venv/lib/python3.13/site-packages/livekit/agents/utils/aio/duplex_unix.py", line 43, in recv_bytes
raise DuplexClosed() from e
livekit.agents.utils.aio.duplex_unix.DuplexClosed
2025-09-01 06:23:22,220 - WARNING livekit.agents - Failed to get memory info for process {"pid": 27848, "inference": true}
Traceback (most recent call last):
File "/root/.venv/lib/python3.13/site-packages/livekit/agents/ipc/supervised_proc.py", line 361, in _memory_monitor_task
process = psutil.Process(self._pid)
File "/root/.venv/lib/python3.13/site-packages/psutil/__init__.py", line 317, in __init__
self._init(pid)
~~~~~~~~~~^^^^^
File "/root/.venv/lib/python3.13/site-packages/psutil/__init__.py", line 363, in _init
raise NoSuchProcess(pid, msg=msg) from None
psutil.NoSuchProcess: process PID not found (pid=27848)tall-airline-16756
09/01/2025, 6:23 AMtall-airline-16756
09/01/2025, 6:24 AMasyncio.IncompleteReadError or EOFError popped up during communication.
• Process Termination: The related process exited or was stopped.
• Timeouts or Health Checks: The process became unresponsive and was shut down.
Here’s how you can handle this error:
• Wrap your IPC calls (like arecv_message) in try-except blocks to catch DuplexClosed exceptions.
• Make sure to manage the lifecycle of your processes properly to prevent them from closing too soon.
• Keep an eye on process health and logs to spot any crashes or timeouts early.
This kind of error is pretty normal in the IPC lifecycle, so it’s best to handle it smoothly in your code. If you want, I’m here to help you work through it! Sources: livekit-agents/livekit/agents/ipc/channel.pydry-rainbow-66344
09/01/2025, 6:26 AMtall-airline-16756
09/01/2025, 6:27 AMstart() method to get your processes going. If you’ve got multiple processes, a process pool with pool.start() is your best friend.
2. Initialization: Once started, give your process a little setup love with initialize(). This gets IPC ready and sends the necessary configuration to the child process.
3. Job Execution: When you’re ready to assign work, call launch_job(info). The child process will take it from there, running the job with the context you provide.
4. Monitoring: Keep an eye on things with health checks like ping-pong messages to make sure the process is responsive. Also, watch memory usage and gently stop any processes that go over the limits.
5. Graceful Shutdown: When it’s time to wrap up, use aclose() to politely ask the process to shut down. If it’s being stubborn and doesn’t stop in time, kill() will step in for a forceful goodbye.
Following these steps helps everything run smoothly and keeps errors at bay. If you want me to dive deeper into any part, just let me know—I’m here to help! Sources: livekit-agents/livekit/agents/ipc/inference_proc_executor.pydry-rainbow-66344
09/01/2025, 6:27 AMtall-airline-16756
09/01/2025, 6:28 AMimport asyncio
import multiprocessing as mp
import socket
from livekit.agents.ipc import channel, proto
async def manage_process_lifecycle():
# Create socket pair for IPC
parent_socket, child_socket = socket.socketpair()
# Create a child process
process = mp.Process(target=child_process_main, args=(child_socket,))
process.start()
child_socket.close()
try:
# Open parent socket for async communication
pch = await channel._AsyncDuplex.open(parent_socket)
# Initialize the process
await channel.asend_message(pch, proto.InitializeRequest(ping_interval=2.0, ping_timeout=10.0))
init_resp = await channel.arecv_message(pch, proto.IPC_MESSAGES)
if isinstance(init_resp, proto.InitializeResponse):
print("Process initialized successfully")
# Send a test message
await channel.asend_message(pch, proto.EchoMessage(text="Hello from parent"))
response = await channel.arecv_message(pch, proto.IPC_MESSAGES)
if isinstance(response, proto.EchoMessage):
print(f"Received echo: {response.text}")
# Gracefully shut down the process
await channel.asend_message(pch, proto.ShutdownRequest(reason="normal shutdown"))
await pch.aclose()
finally:
if process.is_alive():
process.terminate()
process.join()
def child_process_main(socket):
async def run():
cch = await channel._AsyncDuplex.open(socket)
init_req = await channel.arecv_message(cch, proto.IPC_MESSAGES)
if isinstance(init_req, proto.InitializeRequest):
await channel.asend_message(cch, proto.InitializeResponse())
while True:
msg = await channel.arecv_message(cch, proto.IPC_MESSAGES)
if isinstance(msg, proto.ShutdownRequest):
break
asyncio.run(run())
if __name__ == "__main__":
asyncio.run(manage_process_lifecycle())
This example walks you through creating a process, initializing it, exchanging messages, and then shutting it down nicely. If you have any questions or want me to show you more examples, just let me know—I’m happy to help! Sources: livekit-agents/livekit/agents/cli/watcher.pydry-rainbow-66344
09/01/2025, 6:30 AMtall-airline-16756
09/01/2025, 6:31 AMfrom livekit.agents import Agent, function_tool
from livekit import api
class SIPLifecycleAgent(Agent):
def __init__(self, job_context=None):
self.job_context = job_context
super().__init__(
instructions="You are a SIP lifecycle manager. You can add phone participants and end the call.",
stt=deepgram.STT(),
llm=openai.LLM(model="gpt-4o"),
tts=elevenlabs.TTS(model="eleven_multilingual_v2"),
vad=silero.VAD.load()
)
@function_tool
async def add_sip_participant(self, context, phone_number: str):
if not self.job_context:
await self.session.say("Oops, I can’t add a participant right now because there’s no job context.")
return None, "Job context not available"
try:
response = await self.job_context.api.sip.create_sip_participant(
api.CreateSIPParticipantRequest(
sip_trunk_id=os.environ["SIP_TRUNK_ID"],
sip_call_to=phone_number,
room_name=self.job_context.room.name,
participant_identity=f"sip_{uuid.uuid4().hex[:8]}",
participant_name=f"SIP {phone_number}",
krisp_enabled=True
)
)
return None, f"Great! Added {phone_number} to the call."
except Exception as e:
return None, f"Sorry, I couldn’t add the participant: {e}"
@function_tool
async def end_call(self, context):
if not self.job_context:
await self.session.say("I can’t end the call right now because there’s no job context.")
return None, "Job context unavailable"
try:
await context.session.generate_reply(instructions="Goodbye!")
await self.job_context.api.room.delete_room(
api.DeleteRoomRequest(room=self.job_context.room.name)
)
return None, "Call ended successfully. Talk soon!"
except Exception as e:
return None, f"Oops, something went wrong while ending the call: {e}"
async def entrypoint(ctx):
agent = SIPLifecycleAgent(job_context=ctx)
session = AgentSession()
await session.start(agent=agent, room=ctx.room)
if __name__ == "__main__":
cli.run_app(WorkerOptions(entrypoint_fnc=entrypoint))
This example shows you how to add SIP participants, end calls, and manage your voice agent’s lifecycle smoothly. If you want me to walk you through any part or need more examples, just let me know—I’m here to help! Sources: telephony/sip_lifecycle.py | Job lifecycle | LiveKit Docs | agent_extensions/agent_extensions/handlers/wake_word_handler.py | Worker lifecycle | LiveKit Docs | LiveKit Docsdry-rainbow-66344
09/01/2025, 6:32 AMtall-airline-16756
09/01/2025, 6:32 AMpython app.py &
SERVER_PID=$!
2. Stop the Process: Use the kill command to gently end the process before launching a new one:
kill $SERVER_PID
3. Find and Stop It Manually: If you didn’t save the PID, no worries! Find the process with:
`ps aux | grep python`Then stop it by running:
kill <PID>
4. Stop All Python Processes (Optional): If you want to close all Python processes at once, just use:
pkill python
Doing this helps make sure there are no conflicting processes running before you start your agent. If you have any questions or need a hand, just let me know—I’m here to help! Sources: metrics/send-metrics-to-3p/run_3p_metrics_demo.sh | Job lifecycle | LiveKit Docsdry-rainbow-66344
09/01/2025, 6:45 AMtall-airline-16756
09/01/2025, 6:46 AMmemoryLimitMB or find ways to use memory more efficiently.
2. Process Not Responding: If the process doesn’t reply to ping messages within the ping_timeout, it will be stopped. You can try increasing the ping_timeout or make sure the agent isn’t blocking the event loop for too long.
3. Initialization Timeout: The process needs to respond to an InitializeRequest quickly. Consider increasing the initialize_timeout or streamlining your startup steps.
4. External Termination: Sometimes the OS steps in and kills the process due to resource issues like running out of memory. Checking your system logs for any OOM killer activity can help, and adding more memory might do the trick.
5. Graceful Shutdown Problems: If the process doesn’t handle a ShutdownRequest within the close_timeout, it will be forcefully stopped. Make sure you have proper cleanup in place and maybe increase the close_timeout if needed.
To dig a little deeper:
• Turn on verbose logging to get more detailed info.
• Keep an eye on memory and CPU usage while things are running.
• Check your system logs for any signs of external termination.
If you want, I’m here to help you tweak these settings or troubleshoot further! Just let me know. Sources: livekit-agents/livekit/agents/ipc/job_proc_lazy_main.py | api-extractor-shared.json | Agent deployment CLI reference | LiveKit Docs | Still Have Questionsdry-rainbow-66344
09/01/2025, 6:47 AMtall-airline-16756
09/01/2025, 6:47 AMpython app.py &
SERVER_PID=$!
2. Kill the Process: Use the kill command to stop the process before starting a new one:
kill $SERVER_PID
3. Find and Kill Manually: If you didn’t save the PID, no worries! You can find the process with:
`ps aux | grep python`Then stop it by running:
kill <PID>
4. Kill All Python Processes (Optional): If you want to stop all Python processes at once, try:
pkill python
This way, you’ll be sure no conflicting processes are running before you start your agent. If you need a hand with anything else, just let me know!dry-rainbow-66344
09/01/2025, 6:50 AMtall-airline-16756
09/01/2025, 6:50 AMkill command with the PID:
kill 30025
2. Check if It’s Stopped: See if the process is still running by typing:
`ps aux | grep 30025`If it’s still there, you might need to force it to stop with:
kill -9 30025
3. Restart Your Script: After you’ve stopped the process, you’re good to go to restart your script.
If you run into any trouble or have questions, just let me know—I’m here to help!dry-rainbow-66344
09/01/2025, 6:51 AMtall-airline-16756
09/01/2025, 6:52 AMkill -9 <PID>
3. Verify: Run ps aux | grep python again to double-check that no related processes are still running.
4. Restart Your Script: Once you’re sure everything’s clear, feel free to restart your script safely.
If you need a hand with any of these steps or have more questions, just let me know—I’m here to help!dry-rainbow-66344
09/01/2025, 7:13 AMclass Assistant(Agent):
def __init__(self) -> None:
super().__init__(
instructions="""You are a helpful voice AI assistant.
You automatically adapt to the language the user speaks in, supporting all major Indian languages such as Hindi, Kannada, Tamil, Telugu, Bengali, Marathi, Malayalam, Gujarati, Punjabi, and English.
You eagerly assist users with their questions by providing information from your extensive knowledge.
Your responses are always clear, concise, and to the point, without using any complex formatting or special characters.
You are curious, friendly, and have a natural sense of humor while keeping the conversation respectful and culturally appropriate to the language being spoken.""",
)
# all functions annotated with @function_tool will be passed to the LLM when this
# agent is active
@function_tool
async def lookup_weather(self, context: RunContext, location: str):
"""Use this tool to look up current weather information in the given location.
If the location is not supported by the weather service, the tool will indicate this. You must tell the user the location's weather is unavailable.
Args:
location: The location to look up weather information for (e.g. city name)
"""
logger.info(f"Looking up weather for {location}")
return "sunny with a temperature of 70 degrees."
def prewarm(proc: JobProcess):
proc.userdata["vad"] = silero.VAD.load()
async def entrypoint(ctx: JobContext):
# Logging setup
# Add any other context you want in all log entries here
ctx.log_context_fields = {
"room": ctx.room.name,
}
# Set up a voice AI pipeline using OpenAI, Cartesia, Deepgram, and the LiveKit turn detector
session = AgentSession(
# A Large Language Model (LLM) is your agent's brain, processing user input and generating a response
# See all providers at https://docs.livekit.io/agents/integrations/llm/
llm=openai.LLM(model="gpt-4o-mini"),
# Speech-to-text (STT) is your agent's ears, turning the user's speech into text that the LLM can understand
# See all providers at https://docs.livekit.io/agents/integrations/stt/
#stt=deepgram.STT(model="nova-3", language="multi"),
stt=sarvam.STT(language="kn-IN", model="saarika:v2.5", api_key=SARVAM_API_KEY),
# Text-to-speech (TTS) is your agent's voice, turning the LLM's text into speech that the user can hear
# See all providers at https://docs.livekit.io/agents/integrations/tts/
#tts=cartesia.TTS(voice="6f84f4b8-58a2-430c-8c79-688dad597532"),
tts=sarvam.TTS(target_language_code="kn-IN", speaker="anushka", api_key=SARVAM_API_KEY),
# VAD and turn detection are used to determine when the user is speaking and when the agent should respond
# See more at https://docs.livekit.io/agents/build/turns
turn_detection=MultilingualModel(),
vad=ctx.proc.userdata["vad"],
# allow the LLM to generate a response while waiting for the end of turn
# See more at https://docs.livekit.io/agents/build/audio/#preemptive-generation
preemptive_generation=True,
)
# To use a realtime model instead of a voice pipeline, use the following session setup instead:
# session = AgentSession(
# # See all providers at https://docs.livekit.io/agents/integrations/realtime/
# llm=openai.realtime.RealtimeModel(voice="marin")
# )
# sometimes background noise could interrupt the agent session, these are considered false positive interruptions
# when it's detected, you may resume the agent's speech
@session.on("agent_false_interruption")
def _on_agent_false_interruption(ev: AgentFalseInterruptionEvent):
logger.info("false positive interruption, resuming")
session.generate_reply(instructions=ev.extra_instructions or NOT_GIVEN)
# Metrics collection, to measure pipeline performance
# For more information, see https://docs.livekit.io/agents/build/metrics/
usage_collector = metrics.UsageCollector()
@session.on("metrics_collected")
def _on_metrics_collected(ev: MetricsCollectedEvent):
metrics.log_metrics(ev.metrics)
usage_collector.collect(ev.metrics)
# --- LLM + Agent Metrics Setup ---
usage_collector = metrics.UsageCollector()
# Per-request LLM metrics (prompt/completion tokens, TTFT, throughput)
def sync_llm_metrics(m: metrics.LLMMetrics):
asyncio.create_task(on_llm_metrics(m))
session.llm.on("metrics_collected", sync_llm_metrics)
async def on_llm_metrics(m: metrics.LLMMetrics):
logger.info("---- LLM Request Metrics ----")
logger.info(f"Prompt tokens: {m.prompt_tokens}")
logger.info(f"Completion tokens: {m.completion_tokens}")
logger.info(f"Total tokens: {m.total_tokens}")
logger.info(f"TTFT: {m.ttft:.2f}s")
logger.info(f"Tokens/sec: {m.tokens_per_second:.2f}")
# Aggregate metrics across the session
@session.on("metrics_collected")
def _on_metrics_collected(ev: MetricsCollectedEvent):
usage_collector.collect(ev.metrics)
async def log_usage():
summary = usage_collector.get_summary()
logger.info("---- Session Summary ----")
logger.info(f"Total prompt tokens: {summary.llm_prompt_tokens}")
logger.info(f"Total completion tokens: {summary.llm_completion_tokens}")
logger.info(f"Total LLM tokens: {summary.llm_total_tokens}")
logger.info(f"Usage: {summary}")
ctx.add_shutdown_callback(log_usage)
# # Add a virtual avatar to the session, if desired
# # For other providers, see https://docs.livekit.io/agents/integrations/avatar/
# avatar = hedra.AvatarSession(
# avatar_id="...", # See https://docs.livekit.io/agents/integrations/avatar/hedra
# )
# # Start the avatar and wait for it to join
# await avatar.start(session, room=ctx.room)
# Start the session, which initializes the voice pipeline and warms up the models
await session.start(
agent=Assistant(),
room=ctx.room,
room_input_options=RoomInputOptions(
# LiveKit Cloud enhanced noise cancellation
# - If self-hosting, omit this parameter
# - For telephony applications, use `BVCTelephony` for best results
noise_cancellation=noise_cancellation.BVC(),
),
)
# Join the room and connect to the user
await ctx.connect()
if __name__ == "__main__":
cli.run_app(WorkerOptions(entrypoint_fnc=entrypoint, prewarm_fnc=prewarm))
`tall-airline-16756
09/01/2025, 7:14 AMctx.add_shutdown_callback() to tidy things up when the session ends. Just keep these callbacks quick so they don’t run into the shutdown timeout.
2. Initialization Timeout: Make sure your initialization finishes within the default 10-second window. If it’s taking longer, you can bump up the timeout with initialize_timeout in your settings.
3. Memory and Health Monitoring: Set memory limits using job_memory_limit_mb and keep an eye on responsiveness with ping_interval and ping_timeout. If things go over these limits, the process will be stopped.
4. Resource Management: Use async context managers like async with for things like HTTP sessions or plugins to make sure everything cleans up nicely.
5. Connection Management: Don’t forget to call ctx.connect() to set up room connections and ctx.shutdown() to clean up properly. The framework will give you a heads-up if these aren’t called within 10 seconds of starting the job.
6. Diagnostics: Turn on verbose logging and use HTTP health check endpoints to keep tabs on your agent’s status and catch any issues early.
If you want, I’m here to help you apply these fixes to your specific code—just let me know! Sources: Job lifecycle | LiveKit Docs | agents/src/voice/agent_session.ts | Worker lifecycle | LiveKit Docs | livekit-agents/livekit/agents/worker.pydry-rainbow-66344
09/01/2025, 7:14 AMtall-airline-16756
09/01/2025, 7:15 AMclass Assistant(Agent):
def __init__(self) -> None:
super().__init__(
instructions="""You are a helpful voice AI assistant.
You automatically adapt to the language the user speaks in, supporting all major Indian languages such as Hindi, Kannada, Tamil, Telugu, Bengali, Marathi, Malayalam, Gujarati, Punjabi, and English.
You eagerly assist users with their questions by providing information from your extensive knowledge.
Your responses are always clear, concise, and to the point, without using any complex formatting or special characters.
You are curious, friendly, and have a natural sense of humor while keeping the conversation respectful and culturally appropriate to the language being spoken.""",
)
@function_tool
async def lookup_weather(self, context: RunContext, location: str):
logger.info(f"Looking up weather for {location}")
return "sunny with a temperature of 70 degrees."
def prewarm(proc: JobProcess):
proc.userdata["vad"] = silero.VAD.load()
async def entrypoint(ctx: JobContext):
ctx.log_context_fields = {
"room": ctx.room.name,
}
session = AgentSession(
llm=openai.LLM(model="gpt-4o-mini"),
stt=sarvam.STT(language="kn-IN", model="saarika:v2.5", api_key=SARVAM_API_KEY),
tts=sarvam.TTS(target_language_code="kn-IN", speaker="anushka", api_key=SARVAM_API_KEY),
turn_detection=MultilingualModel(),
vad=ctx.proc.userdata["vad"],
preemptive_generation=True,
)
@session.on("agent_false_interruption")
def _on_agent_false_interruption(ev: AgentFalseInterruptionEvent):
logger.info("false positive interruption, resuming")
session.generate_reply(instructions=ev.extra_instructions or NOT_GIVEN)
usage_collector = metrics.UsageCollector()
@session.on("metrics_collected")
def _on_metrics_collected(ev: MetricsCollectedEvent):
metrics.log_metrics(ev.metrics)
usage_collector.collect(ev.metrics)
async def log_usage():
summary = usage_collector.get_summary()
logger.info("---- Session Summary ----")
logger.info(f"Total prompt tokens: {summary.llm_prompt_tokens}")
logger.info(f"Total completion tokens: {summary.llm_completion_tokens}")
logger.info(f"Total LLM tokens: {summary.llm_total_tokens}")
logger.info(f"Usage: {summary}")
ctx.add_shutdown_callback(log_usage)
# Graceful shutdown callback
async def cleanup():
logger.info("Performing cleanup before shutdown")
ctx.add_shutdown_callback(cleanup)
# Start the session
await session.start(
agent=Assistant(),
room=ctx.room,
room_input_options=RoomInputOptions(
noise_cancellation=noise_cancellation.BVC(),
),
)
# Connect to the room
await ctx.connect()
if __name__ == "__main__":
cli.run_app(WorkerOptions(
entrypoint_fnc=entrypoint,
prewarm_fnc=prewarm,
initialize_timeout=20, # Increased timeout for initialization
shutdown_process_timeout=60, # Ensures proper cleanup
job_memory_limit_mb=1024, # Set memory limit to 1GB
ping_timeout=15, # Increased ping timeout
))
This updated code includes:
• Graceful shutdown handling with ctx.add_shutdown_callback() to make sure everything wraps up nicely.
• Increased initialization and ping timeouts so the process has enough time and doesn’t get cut off too soon.
• Memory limit configuration to keep resource use in check.
• Proper cleanup logic during shutdown to keep things running smoothly.
If you want me to tweak anything else or have questions, just let me know—I’m here to help!dry-rainbow-66344
09/01/2025, 7:17 AM(.venv) root@livekit:~# python3 new_.py connect --room my-first-room
2025-09-01 07:17:19,677 - DEBUG asyncio - Using selector: EpollSelector
2025-09-01 07:17:19,680 - DEV livekit.agents - Watching /root
2025-09-01 07:17:21,455 - DEBUG asyncio - Using selector: EpollSelector
2025-09-01 07:17:21,460 - INFO livekit.agents - starting worker {"version": "1.2.6", "rtc-version": "1.0.12"}
2025-09-01 07:17:21,461 - INFO livekit.agents - preloading plugins {"packages": ["livekit.plugins.cartesia", "livekit.plugins.deepgram", "livekit.plugins.openai", "livekit.plugins.silero", "livekit.plugins.sarvam", "livekit.plugins.turn_detector", "av"]}
2025-09-01 07:17:21,463 - INFO livekit.agents - starting inference executor
2025-09-01 07:17:23,102 - INFO livekit.agents - initializing process {"pid": 10310, "inference": true}
2025-09-01 07:17:23,498 - DEBUG livekit.agents - initializing inference runner {"runner": "lk_end_of_utterance_multilingual", "pid": 10310, "inference": true}
2025-09-01 07:17:30,219 - ERROR livekit.agents - worker failed
Traceback (most recent call last):
File "/root/.venv/lib/python3.13/site-packages/livekit/agents/utils/aio/duplex_unix.py", line 35, in recv_bytes
len_bytes = await self._reader.readexactly(4)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/asyncio/streams.py", line 767, in readexactly
raise exceptions.IncompleteReadError(incomplete, n)
asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of 4 expected bytes
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/root/.venv/lib/python3.13/site-packages/livekit/agents/cli/_run.py", line 79, in _worker_run
await worker.run()
File "/root/.venv/lib/python3.13/site-packages/livekit/agents/worker.py", line 403, in run
await self._inference_executor.initialize()
File "/root/.venv/lib/python3.13/site-packages/livekit/agents/ipc/supervised_proc.py", line 169, in initialize
init_res = await asyncio.wait_for(
^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
)
^
File "/usr/lib/python3.13/asyncio/tasks.py", line 507, in wait_for
return await fut
^^^^^^^^^
File "/root/.venv/lib/python3.13/site-packages/livekit/agents/ipc/channel.py", line 47, in arecv_message
return _read_message(await dplx.recv_bytes(), messages)
^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.venv/lib/python3.13/site-packages/livekit/agents/utils/aio/duplex_unix.py", line 43, in recv_bytes
raise DuplexClosed() from e
livekit.agents.utils.aio.duplex_unix.DuplexClosed
2025-09-01 07:17:30,253 - WARNING livekit.agents - Failed to get memory info for process {"pid": 10310, "inference": true}
Traceback (most recent call last):
File "/root/.venv/lib/python3.13/site-packages/livekit/agents/ipc/supervised_proc.py", line 361, in _memory_monitor_task
process = psutil.Process(self._pid)
File "/root/.venv/lib/python3.13/site-packages/psutil/__init__.py", line 317, in __init__
self._init(pid)
~~~~~~~~~~^^^^^
File "/root/.venv/lib/python3.13/site-packages/psutil/__init__.py", line 363, in _init
raise NoSuchProcess(pid, msg=msg) from None
psutil.NoSuchProcess: process PID not found (pid=10310)tall-airline-16756
09/01/2025, 7:18 AM