API Gateway WebSocket Connections Randomly Disconnect

I’m using API Gateway WebSockets for an app that needs to work in real time, but users are saying they keep getting disconnected.

It doesn’t always happen at the same time; sometimes it happens after 30 seconds, and other times after 20 minutes. CloudWatch logging doesn’t show throttling or backend errors, and my WebSocket idle timeout is set up correctly.

Why it might be happening:

  • Problems with the network on the client side or at the AWS edge location
  • Not properly cleaning up old connection IDs
  • API Gateway throttling bursts that aren’t logged
  • Lambda backend is taking too long to answer
  • Integration or routing latency that makes connections drop without a sound

Has anyone experienced intermittent WebSocket drops on API Gateway?

What changes to your settings or debugging steps helped you fix WebSocket connections?

Is this a RMS question or some other question? e.g. what does this have to do with Recast?

I’m going to assume this is not a Recast question but a generally question related to websockets. if I’m wrong please let me know.

Hey! This isn’t about Recast/RMS; I’m just looking for help with our real-time app’s AWS API Gateway WebSocket disconnects that happen from time to time.
I’m wondering if anyone has seen this and what settings or steps they took to fix it.

This is not the right place to get help with websocket questions. I would try an Reddit or an AWS forum.