We have been seeing quite a few `process is unresp...
# agents
p
We have been seeing quite a few
process is unresponsive, killing process
error logs recently. Inspecting the logs they appear often (not always) after I see an Agent started speaking event, followed by a
no candidates in response
from google. The
agent stopped speaking
event is never shown in these cases. Some process appears to be stuck. Any idea what is wrong here?
r
Do you have something in your agent code blocking the main process? This can also be a potential cause: https://kb.livekit.io/articles/6481005689-troubleshooting-latency-and-timeout-errors-with-turn-detection-on-aws
p
I dont think that I have any major blocking agent code. I am trying to use async code everywhere. Is there a way to find out which process or code is responsible for the blocking? We are hosting on railway and i dont see any memory or CPU warnings
@refined-appointment-81829 It is also pretty strange that in these instances, a new job request with the same job_id is being received and the conversation goes on. Only problem is, that the whole chat context is gone, leading to the AI "starting from scratch" in between the conversation
r
How can I reproduce this?
p
That's a good question 😄 I also cant reproduce it. It happens in around 1% of our calls. We are using gemini JSON parsing, deepgram and 11labs. The only similarity that i see is that if it happens, it happens after a
no candidates in the response warning
and the two metrics logs. It does not mean that it always happens after that warning. I would love to add some logs to dig deeper - but honestly no idea where to add them. If there would be a trace available to the process that was unresponsive, i could work on that
r
you could try a python profiler or thread debugger or something I guess.
p
@refined-appointment-81829 I was able to witness the killing process error now myself: I heard the agent speaking and I have seen the agent state move to "speaking". Then all of a sudden the audio play stopped half way without an error (we are using 11labs). In my agent code I wait for the agent state
listening
which never came. I am muting the user as long as the agent is speaking. That lead to a deadlock, leading to the process killing error. So I am wondering whether the error handling / state management of the agent speaking is all proper at livekit
r
So I am wondering whether the error handling / state management of the agent speaking is all proper at livekit
I am not aware of any issues. If you can use basic_agent.py and provide some steps I can use to reproduce the issue we can look into it.
p
@refined-appointment-81829 I found that this error started to appear in the moment when we upgraded from 1.2.7 -> 1.2.12, without any code changes on our end. We downgraded to 1.2.7 for now. And i created a ticket, with some findings. My suspicion is that there is something wrong with the last audio frame or so. The block starts to occur in the moment when the TTS node finishes to process all audio frames. https://github.com/livekit/agents/issues/3637
p
@plain-librarian-80497 are you using 11labs TTS by any chance? Not a Livekit team member, I am looking to upgrade the SDK to 1.2.15. Want to know if this is occurring because of 11labs as the PR you pointed - https://github.com/livekit/agents/pull/3438/commits that might be the root causes fixes issues for 11labs.
@jolly-air-155 - can you pls check this when you are around - https://github.com/livekit/agents/issues/3637 Seems like multiple users are facing this issue. @plain-librarian-80497 unsure why you claim the root cause could be the https://github.com/livekit/agents/pull/3438/commits as I don't see any blocking code there.
p
@proud-match-31207 Yes we are using 11labs. Honestly pointing to that commit was just an educated guess, since this commit touched audio playback and I think this issue is related to audio playback (can just as well be related to a specific 11labs issue). Actually after we have downgraded to 1.2.7. we were seeing WAY less of these errors - yet they still occurred twice for us in the last days. So the issue seemed indeed to exist even before 1.2.7 (even though way less frequent)
👍 1
p
Thanks for the response Nikolaus. How many times were you seeing this in 1.2.12 version that you had upgraded to? If you can reference using percentages, that can be helpful.
p
@proud-match-31207 in around 2-4% of our calls we were seeing this error
our calls have an average duration of 15 mins
now, with downgrading to 1.2.7 we are seeing it in less than 0.1% (it just happened a couple of times in the last week)
p
Got it - thanks for the numbers Nikolaus.
@refined-appointment-81829 - I am also seeing this error after upgrading to
1.2.15
from
1.2.6
. The issue occurred for the below room:
Room ID
-
RM_qfrHfXJv5Wvy
and Project Id -
p_3tqm7ro6kbs
Here is what I see in the logs, the Agent received a false Interruption midway in the call, the process got stuck after the false interruption event and did NOT resume the audio and the call session was stuck. Even after the participant disconnected, we did NOT receive a
Shutdown
event or
Participant disconnected
event. And we receive the below logs:
Copy code
{"message": "livekit::rtc_engine:453:livekit::rtc_engine - received session close: \"signal client closed: \\\"stream closed\\\"\" UnknownReason Resume", "level": "WARNING", "name": "livekit", "pid": 5135, "job_id": "AJ_eGH5rtVmniTP", "timestamp": "2025-10-22T21:40:22.189554+00:00"}
{"message": "process is unresponsive, killing process", "level": "ERROR", "name": "livekit.agents", "pid": 5135, "job_id": "AJ_eGH5rtVmniTP", "timestamp": "2025-10-22T21:40:31.067361+00:00"}
{"message": "killing process", "level": "INFO", "name": "livekit.agents", "pid": 5135, "job_id": "AJ_eGH5rtVmniTP", "timestamp": "2025-10-22T21:40:31.067541+00:00"}
Not trying to say that resuming on false interruption is leading to process being stuck but this is what I see in the call that was unresponsive. @jolly-air-155 @boundless-energy-78552 - can you please check this. This seems to be affecting multiple users now where the process is stuck and is unresponsive during resuming audio. Other users reporting this issue - https://github.com/livekit/agents/issues/3637 Parameters being used: TTS - Cartesia, STT - Deepgram, false interruption timeout - 1 secs, resume false interruption, allow interruption - true, Happy to share further logs or information needed.
🙌 1
👀 1
j
looking into this issue, what python version and system are you using?
p
Hello @jolly-air-155 - using python version -
3.11.11
and
python:3.11.11-slim
docker image in k8s
p
we are using python
3.11
. Had seen the error locally on my mac as well as on railway in production
j
found something maybe related https://github.com/livekit/agents/issues/3637#issuecomment-3460484809, would like to confirm, does this usually happen during the interruption or false interruption resume?
p
> false interruption resume? During false interruption resume is when I have seen this occurs.
p
@jolly-air-155 I have
resume_false_interruption
set to the default (so true). But i dont see any logs, to answer your question. I mute the user using
self.session.input.set_audio_enabled(True)
in the moment the agent starts speaking. So I am not sure if the agent can be falsely interrupted during their speech