Gemini live cut off issue

Gemini real-time model randomly cut off in between the call. I’ve built this agent with nodejs. I have been searching exhaustively everywhere on the internet for a concrete solution of it. Could you help how can I fix this issue?