Replies: 2 comments 2 replies
-
Hey! Looking at you're code it seems you do not hold any reference to a socket so it might be a problem from the socketioxide lib. What would be nice is to print all sockets periodically and check if they are disconnected or if there channel is full or empty. Also do you know how the sockets are disconnected, is it by brutally closing the connection, by closing it from the server or the client? This could help me to check if I can find something in the corresponding code. |
Beta Was this translation helpful? Give feedback.
-
Hello, thanks for your reply! I just checked, and running it locally, if I overload the server (holding down F5 to refresh the page) this happens as well. This makes me think it is not specifically related to duration, but some event that only happens after a while during normal use. Using some logging, I was able to determine that all sockets say that they are connected, but I know that is not true. The SocketIo instance is holding sockets that should have been removed long ago, buffering messages to them (which they can't send because they aren't actually connected), and causing the internal channel to fill up. The sockets are disconnected by just closing the connection when closing a tab or the web browser, there is no graceful disconnection code in place. For some reason, the server is sometimes not removing sockets when they disconnect. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am running into a bug where the server holds sockets long after the client has disconnected. This leads to endless message buffering, ending in an InternalChannelFull error. I would make an issue, but the bug is not easily reproducible: I don't know what causes it, but it consistently happens when my server is running (usually 12+ hours after starting it).
I have spent hours looking at my code and haven't been able to find what could be introducing this bug causing some sockets to be held for longer than they should be. No deadlocks, no persistent references to sockets themselves, nothing.
I just wondered if anyone has experienced a similar issue and might how to fix it, or if anyone has any debugging ideas.
This code is here https://github.com/JMANN240/dots-not-bots
Beta Was this translation helpful? Give feedback.
All reactions