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
My client sockets disconnect with a "ping timeout" reason after a few hours of connection and can't connect again #5012
Comments
Hi! That's weird indeed. It seems the client is not even able to reach the server. Is the server reachable? What happens if you restart the server? nginx? You mention using a device, are you on Android? iOS? |
Yes the server is reachable since i can connect it from another device or if i just reload the app. If i restart the server nothing changes, they still can't connect, even though they try to reconnect. It happens on IOS and Android. All of my devices are turned on and the app is open h24 Edit : Also important to note that all of them disconnected at the same time (i have some logs if you need) |
Once try that if you are emitting some random data at fix time interval probably less than 1/2 hrs as it appears that there is a time out error also try connecting it with new devices after this error arises |
yes, i am also facing the same issue if anyone knows how to solve this issue please revert. my application is always open on desktop either in minimize or in focus. but after some random time. on server it is showing that user is disconencted due to pingTimeout. i am using the latest version of socket io client and socket io both. website is build using mern |
@maximilien0405 have u got any permanent solution rather that the hacks like window.reload and all. is this window.reload mechanism works properly |
@darrachequesne please help |
Hi, i'm having a bit of a issue with my project. I'm building an app that will stay opened at all times in the device, with a non-stop connection through the sockets. However lately, all of my sockets disconnect and can't reconnect. I managed to print some logs from the device and here it is :
As you can see on the screenshot, the socket connection starts at around 1:30 AM and then is disconnectd at 7:30 AM, but manages to reconnect each time until 9:14 where it disconnects and then can't reconnect with the reason "ping timeout".
I'm not sure where is the problem here. I'm using Angular 17 with ngx-socket-io version 4.6.1. In my backend i use NestJS with socket-io 4.7.2.
Since this problem that happend this morning i did theses steps to try to fix the problem (i haven't tried it yet) :
Any idea what could be causing the problem ? Also it's important to note than in my APP i have an interval that tries to connect to the socket every minute just in case it's disconnected, but as you can see on the logs, it can't even reconnect 🤔
@darrachequesne
The text was updated successfully, but these errors were encountered: