Replies: 2 comments 1 reply
-
The meaning of "session is disconnected" is this: the client was connected, but at some point became unresponsive and the server decided to remove it. After the removal, the client showed up again and attempted to continue using the connection. If you enable Engine.IO logs and look at previous log entries that match the The most straightforward definition of "unresponsive client" is one that fails to respond in a timely manner when the server pings it. But there is another possibility which is common, which is that your server became slow due to managing too many connections, and due to the slow processing it fails to handle responses to pings in time, even if the client sends them promptly. |
Beta Was this translation helpful? Give feedback.
-
Thank you. What's the recommended way to handle them? If the client merely became unresponsive I could let them be. (Or maybe I should detect when clients close a tab, for example, and then ask the client to disconnect from the server?) If it's a case of the server being overloaded… I'll have to think about it, but your opinion would be most welcome. |
Beta Was this translation helpful? Give feedback.
-
I'm getting these tracebacks:
Here's a similar one with logging enabled for engineio:
Because there's no reference to my own codebase in it, I'm having a hard time troubleshooting it.
In a similar thread, @miguelgrinberg wrote "This error occurs when a client take too long to send its ping messages." but it's not clear to me whether this referred to all "KeyError: 'Session is disconnected'" errors.
I hit major traffic to my project (100K pageviews per day) but I think I had these before the traffic spike. (The project is hosted in Europe on Heroku with most of the traffic gain coming from India and Pakistan.)
Thanks for the help! 🙏
Beta Was this translation helpful? Give feedback.
All reactions