Still having disconnection problem (ClientTimeout)
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on PUN.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
Still having disconnection problem (ClientTimeout)
bbekec
2020-10-30 10:58:28
Hello, I use PUN 2 in my mobile card game.
There was a lot of disconnection problem in my game and people all the time were complaining about my game in Playstore and Appstore. Then i got some help from Photon side (My emails and posts on forum had been replied with 2 - 3 days delay). Then main reason of disconnection in my game was "ServerTimeout" and photon suggested me to increase performance of the game. I did it and got a succesfful result, I no more get "ServerTimeout". That is ok, but now, Almost all players still disconnect from server in every game playing. The reason is "ClientTimeout". I am about to go crazy. Photon says me look at "Analyzing Disconnects". Of course i checked it. There is nothing clear. I also talked a person from Photon side, he says me that, "there is nothing to do to solve that problem especially on IOS". There is no huge datas i send via RPC, but it disconnects. You have to find me a solution, PLEASE. (Maybe i do something wrong, so, you should tell me where i am wrong).
Thanks.
Comments
We try to help out where possible but the team is not huge and everyone's a programmer on Photon, too. Sorry for the delays.
Client timeout and server timeout are connected. It means either side is not receiving the ACKs from the other side (on time).
Did you check out the logs when running the SupportLogger? Did you send them?
We are also often bogged down by having one conversation multiple times, because someone asks in many channels, then never bothers to update with any follow up info.
There was quite a lot of email back and forth and I hope you found your solution.
Update us if you feel inclined to help others.
Hello Tobias,
After a long break, i started rebuilding my project again and published my game on markets. Actually there is no much disconnection problem on players side (or i suppose like that), but in my tests, sometimes i have ClientTimeOut issue and i got log from device which disconnects.
02-23 15:26:22.946: I/Unity(31350): Longest delta between Send: 114ms Dispatch: 190ms. Longest callback OnEv: 200=17ms OnResp: 0=5ms. Calls of Send: 22244 Dispatch: 50769. Ping min/max: 13/95
//After this disconnect occurs
02-23 15:26:32.467: E/Unity(31350): OnLeftRoom
02-23 15:26:32.468: I/Unity(31350): [17:37.37] SupportLogger OnDisconnected(ClientTimeout).
02-23 15:26:32.468: W/Unity(31350): [17:37.37] SupportLogger Info: AppID: "488caf7f***" AppVersion: "2.1.2_2.40" Client: v4.1.6.11 (NetStandard20) Build: 2020.3.29f1, Android, ENABLE_IL2CPP, NET_STANDARD_2_0 Socket: SocketTcp UserId: "2783259D7CC11FCE" AuthType: Custom AuthMode: Auth PayloadEncryption State: Disconnected PeerID: 65535 NameServer: ns.photonengine.io Current Server: 92.38.181.71:4531 IP: 92.38.181.71:4531 Region: tr
02-23 15:26:32.468: I/Unity(31350): [17:37.37] SupportLogger Rtt(variance): 21(8). Since receive: 30030ms. Longest send: 0ms. Stats elapsed: 1006sec.
02-23 15:26:32.468: I/Unity(31350): Longest delta between Send: 114ms Dispatch: 190ms. Longest callback OnEv: 200=17ms OnResp: 0=5ms. Calls of Send: 22457 Dispatch: 51245. Ping min/max: 13/95
What can be the reason for ClientTimeOut?
I profiled my game and it's performance seems ok to send ACK.
Thanks
For some reason, the client stopped receiving data (indicated by the Since receive: 30030ms
value). So nothing (no matter what) was received for this time. That's much too long.
This could be a loss of connection or something. Without diving into the individual connections, it is impossible to tell which network device caused missing data where and why. The internet is not fully reliable.
You should cover those rarer cases by using ReconnectAndRejoin, to make it seamless to get back into a room.
If there are plenty such cases, mail us and let us know your appid, region, etc. We will try to have a closer look.
Thanks for your fast reply. I will try to add ReconnectAndRejoin again to my project and i will keep on watching issues. Thanks again.
Back to top