Hello everyone!
I’m using LiveKit Agents (version 0.12.15) along with the OpenAI Realtime plugin (model gpt-4o-realtime-preview-2024-12-17
). I’ve noticed that when multiple students use the AI simultaneously, we frequently see errors like:
response_cancel_not_active
(invalid_request_error).OpenAI S2S connection closed unexpectedly
(sometimes without closing the session).
In my own tests (single user), these errors show up in the logs but don’t actually kick me out of the session or stop the AI from talking. However, when we have multiple concurrent sessions, sometimes the AI goes silent well before the 30-minute mark. Students report that it “stops talking” and won’t resume.
Interestingly, in my late-night tests with no concurrency, I even went past 30 minutes with no real problem (despite these errors appearing in the logs). We’re not hitting any OpenAI usage or credit limits; we have autopay set up and a high usage cap, and we’ve never received a “quota exceeded” error.
Observations / Hypotheses:
- The
response_cancel_not_active
error appears frequently, but with only one user it doesn’t break the session. With multiple concurrent sessions, it seems to cause the AI to stop talking earlier than expected. - The
OpenAI S2S connection closed unexpectedly
error sometimes appears, but doesn’t always end the session. It seems LiveKit might be reconnecting, so the AI keeps working. Other times, the session gets “stuck” and the AI stops responding. - We’re not exceeding any OpenAI usage or daily credit limits.
- Whenever the AI goes silent in concurrent sessions, we see lots of these errors in our Render logs.
I’d appreciate any guidance on why response_cancel_not_active
and OpenAI S2S connection closed unexpectedly
might cause the AI to stop talking. Are there concurrency or retry configurations we need to adjust? Any known issues with this model under multiple concurrent sessions?
Thank you in advance for any suggestions or help!