User disconnect Randomly

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
shiva
Posts: 1
Joined: 05 Nov 2024, 04:08

User disconnect Randomly

Post by shiva »

My web socket users are getting disconnected randomly there is no specific time period for disconnection. SFS2X.SFSEvent.CONNECTION_LOST is getting hit even though sfs.killConnection() method is not being called. It is not a networking issue as pings are good from here to the server.

Any suggestions that could help...
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: User disconnect Randomly

Post by Lapo »

Loosing connection is actually a network problem and pings can be useful to keep a connection alive but they are not fail-proof.
If you could run the same app in a local network you would never loose connection because it's a much more controlled and simple environment than the internet where data packets have to travel through dozens of different routers/gateways and so on.
One error at any of these spots can kill your connection without you knowing the real cause.

Normally, however, these issues should be the exception rather than the norm and it should happen only for a small minority of users, typically less than 5%. If you find out that it is happening to a higher portion of your user base you should start investigating if there might be something wrong with the hosting provider.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply