Intermittent WebSocket "zombie" disconnects with streaming STT — packet loss confirmed specific to api.deepgram.com across multiple ISPs #1699
Replies: 4 comments
|
Thanks for asking your question. Please be sure to reply with as much detail as possible so the community can assist you efficiently. |
|
Hey there! It looks like you haven't connected your GitHub account to your Deepgram account. You can do this at https://community.deepgram.com - being verified through this process will allow our team to help you in a much more streamlined fashion. |
|
It looks like we're missing some important information to help debug your issue. Would you mind providing us with the following details in a reply?
|
|
Hello @LuisResendiz-cyber, Thank you for the detailed report. Apologies for the delay. On your first question, I cannot confirm a known peering issue from Mexico. The public status history from May to October lists no incident specific to Mexico or Latin America. A network-level check needs Support, who can compare your data with our logs. On your second question, the documented regional endpoints are On your third question, please email support@deepgram.com from the address on your Deepgram account. If this is blocking production, say so in the first line. Include:
Please send the mtr output and logs to Support instead of posting them here, because they contain public IP addresses. The close code 1000 in your logs does not show that Deepgram closed the connection cleanly. A close forced by your watchdog reports 1000 by default, and the current Node SDK reports a synthetic 1000 close after a socket error (deepgram-js-sdk pull request 563). If the network path is broken, a Close frame from the service would not reach you either. Please log the Two tests would narrow the cause while Support investigates:
To limit data loss during a stall, buffer audio while reconnecting and realign timestamps afterwards: https://developers.deepgram.com/docs/recovering-from-connection-errors-and-timeouts-when-live-streaming-audio. The Node SDK repository also has a reconnection example: https://github.com/deepgram/deepgram-js-sdk/blob/main/examples/41-transcription-live-reconnect.ts Please reply here with the outcome. |
Uh oh!
There was an error while loading. Please reload this page.
We're running a real-time voice application using Deepgram's streaming STT (linear16, 16kHz, mono) over the Node SDK. We're experiencing recurring disconnects where the connection goes silent (no responses) for ~45s before our client-side watchdog forces a reconnect — logged as:
Sin respuesta de Deepgram en 45000ms (conexión zombie), forzando reconexión
Deepgram connection closed (code: 1000, reason: "no reason")
This happens repeatedly within active sessions, sometimes multiple times per call, even though keep-alives are being sent regularly and pong/ping on our own WebSocket layer confirm the client-server link (ours) stays alive throughout.
What we've ruled out so far:
Server load (CPU/RAM checked during incidents — both low).
Deepgram-side concurrency/rate limits — checked our historical close-event logs; every single close event across hundreds of occurrences is a clean code: 1000, never an error code or a rate-limit/quota message from Deepgram.
Our own LAN — verified clean.
What we've confirmed:
Using mtr in TCP mode (-T -P 443, matching the real protocol/port), we consistently reproduce real packet loss specifically toward api.deepgram.com, while api.elevenlabs.io and api.openai.com (used by the same application) show 0% loss over the same paths at the same times. This was independently reproduced across 5 different last-mile ISPs, with loss toward Deepgram's endpoint ranging 2%–24%, while the other two APIs stayed clean (0.00%) on every single one of those same 5 links.
This strongly suggests the issue is on a transit/peering segment specific to reaching Deepgram's infrastructure from our region (Mexico), not a local network problem on our end.
Questions:
Is this a known issue with peering into api.deepgram.com from Latin America / a specific transit provider?
Is there an alternate regional endpoint we could try?
Any recommended way to get this looked at from Deepgram's network side, given we can reproduce it consistently with hard data (traceroute-level evidence) from multiple independent networks?
Happy to share full mtr output/logs if useful.
All reactions