diff --git a/.changeset/six-wasps-pay.md b/.changeset/six-wasps-pay.md new file mode 100644 index 000000000..03ccb0dd8 --- /dev/null +++ b/.changeset/six-wasps-pay.md @@ -0,0 +1,5 @@ +--- +"livekit-agents": patch +--- + +fix: do not log process warning when process not found diff --git a/livekit-agents/livekit/agents/ipc/supervised_proc.py b/livekit-agents/livekit/agents/ipc/supervised_proc.py index e93f46a9e..e56119876 100644 --- a/livekit-agents/livekit/agents/ipc/supervised_proc.py +++ b/livekit-agents/livekit/agents/ipc/supervised_proc.py @@ -378,11 +378,16 @@ async def _memory_monitor_task(self) -> None: ) except (psutil.NoSuchProcess, psutil.AccessDenied) as e: + if self._closing or self._kill_sent: + return + logger.warning( "Failed to get memory info for process", extra=self.logging_extra(), exc_info=e, ) + # don't bother rechecking if we cannot get process info + return except Exception: if self._closing or self._kill_sent: return