-
Notifications
You must be signed in to change notification settings - Fork 36
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
Keepalive missed / reconnecting #291
Comments
Faced the same issue with current HEAD revision (b608a57) Here is the verbose logging:
It seems in line pyTwitchAPI/twitchAPI/eventsub/websocket.py Line 330 in b608a57
self._connection.receive() keeps listening to the stale connection even after closing it and reconnecting to the new connection.It will receive aiohttp.WSMsgType.CLOSED message after the 10 seconds timeout, and then start listening to the new connection, but at that time Twitch refuses the subscription with a 4003 error.
I think the easiest solution is to set the <10s timeout for ...
try:
message: WSMessage = await self._connection.receive(timeout=1)
except TimeoutError:
continue
... |
TL;DR I assuming that this issue has something to do with socket connection.
I have an Issue which is hard to explain. Every ~30/45 minutes I have some network ananomly. When watching a stream/youtube video it just buffers for a second and when playing games, you dont notice any lag or anything, I am assuming that there might be a short lag spike burst or some sort of socket reconnect issue.
When this network issue accours i get the message
"keepalive missed, connection lost. reconnecting..."
In rare cases I get another traceback:
I looked into the Chat class :
the
check_connection()
is alwaysTrue
I tried changing some numbers on:
but this has no effect.
I tried upgrading from v 4.0.1 to 4.2.0 but its still the same issue, the only difference I noticed is that there is a new message
In rare situation it automaticly reconnects after 5-10 minutes.
I assuming that has something to do with socket connection & not with the twitch implementaiton
The text was updated successfully, but these errors were encountered: