Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: keepalive ping timeout; no close frame received #326

Open
roerohan opened this issue Feb 29, 2024 · 6 comments
Open

Error: keepalive ping timeout; no close frame received #326

roerohan opened this issue Feb 29, 2024 · 6 comments
Assignees
Labels
investigating legacy-releases These are issues for previous versions of the SDK not in active maintenance and support.

Comments

@roerohan
Copy link
Contributor

What is the current behavior?

I get the following error intermittently while sending audio packets over the deepgram socket connection.

sent 1011 (internal error) keepalive ping timeout; no close frame received

This is often followed by the log

[SSL: APPLICATION_DATA_AFTER_CLOSE_NOTIFY] application data after close notify (_ssl.c:2706)

Steps to reproduce

# Code to check if the socket connection is live
while len(self._speech_buffer):
	await self.deepgram_live._socket.send(self._speech_buffer.pop(0))
   	logger.debug("Sent speech from {}", self.peer_id)

P.S. the reason why I'm using the _socket object is that I'm using deepgram-sdk==2.11.0 and I had reported an issue in the past with this version. As you mentioned, the issue was fixed in a new major version, but we haven't gotten around to updating it since it had been working fine for us all this while.

Expected behavior

The socket connection should not close abruptly.

Please tell us about your environment

Operating System/Version: Linux 5.10.209-198.812.amzn2.x86_64 (AWS Ubuntu)
Python Version: 3.10.12

Other information

This error only occurs once in a while, and most often when there are multiple parallel socket connections to deepgram live.

@dvonthenen
Copy link
Contributor

dvonthenen commented Feb 29, 2024

For this issue, the socket isn't receiving any data nor the keepalive message. That is expected behavior, but the SSL error is of concern. I don't have enough experience with the older version, so I will need to take some time to look at it.

PS: I re-opened this issue #183 in order to take a look at it, but not sure when I am going to get time as I have a bunch of things on my plate.

@dvonthenen
Copy link
Contributor

dvonthenen commented Mar 5, 2024

@SandraRodgers said she would take a look at this issue and the other one since she has more knowledge about the v2 client.

@ToxicityMax
Copy link

We recently migrated to v3 and implemented the flag options={"keepalive": "true"} in DeepgramClientOptions to maintain websocket connections. However, we're encountering the same persistent issue where, intermittently, the following error floods the logs, leading to a disruption in receiving transcripts:

This error seems to occur occasionally, but once it starts, it prevents us from receiving any further transcripts through that connection. Despite setting the keepalive flag, this issue persists.

It would be helpful if there are specific troubleshooting steps or additional configurations we should consider to mitigate this issue

@dvonthenen
Copy link
Contributor

We recently migrated to v3 and implemented the flag options={"keepalive": "true"} in DeepgramClientOptions to maintain websocket connections. However, we're encountering the same persistent issue where, intermittently, the following error floods the logs, leading to a disruption in receiving transcripts:

Hi @ToxicityMax This reported issue is for v2 of the SDK. If you are having problems with v3, reach out to discuss in Discord or create a new issue. Before you do, please update to the latest v3.1.7 of the SDK.

@dvonthenen dvonthenen added this to the Python SDK v.3.3 milestone Mar 14, 2024
@rutvik106
Copy link

@ToxicityMax any success with this. I too get "WebSocketException: received 1011 (internal error) Deepgram did not receive audio data or a text message within the timeout window. See https://dpgr.am/net0001; then sent 1011 (internal error) Deepgram did not receive audio data or a text message within the timeout window. See https://dpgr.am/net0001" even if keep alive is passed as true.

@dvonthenen
Copy link
Contributor

dvonthenen commented Mar 26, 2024

Hi @rutvik106

If this is for v3 and you are having problems, please create another issue since this issue is specifically for v2.

Since we get this question a lot, here are some examples to demonstrate expected failures when not using and also how to utilize the feature: correctly #348

@dvonthenen dvonthenen added the legacy-releases These are issues for previous versions of the SDK not in active maintenance and support. label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating legacy-releases These are issues for previous versions of the SDK not in active maintenance and support.
Projects
None yet
Development

No branches or pull requests

5 participants