Hi everyone,
I am currently building a DIY voice assistant using the Gemini Live API. The real-time bidirectional audio works beautifully, but I am running into a consistent session drop issue.
[My Environment]
-
Hardware: Raspberry Pi Zero 2W
-
Language: Python (
websockets,pyaudio) -
Model:
gemini-3.1-flash-live-preview(Native Audio)
[The Issue] The conversation flows perfectly for about 10 minutes. However, almost exactly around the 10-minute mark, the server consistently closes the WebSocket connection with the following error:
received 1011 (internal error) The service is currently unavailable.
(I have attached a screenshot of my system logs for reference.)
[Impact & Workaround] I implemented an auto-reconnect loop on the client side. While it successfully reconnects in 1-2 seconds, this initializes a completely new session. As a result, the model completely loses the context of the conversation we had over the last 10 minutes.
[My Questions]
-
Is this ~10-minute drop a known hard limit for the
3.1-flash-live-previewmodel, or is it an ongoing stability/resource issue on the server side? -
Is there a recommended pattern to resume the session with the previous context intact (e.g., using a session ID/handle) without having to build a heavy client-side audio buffer? My hardware (Pi Zero 2W) has very limited RAM.
Any insights or advice would be greatly appreciated. Thank you!
(Im not good at Eng, so I use AI translate sorry about that)
