[Bug] Random timeout disconnect

Options
ximael
edited October 2013 in Photon Server
When I turn net simulation on, after awhile there is a timeout disconnect for all peers. More traffic, faster disconnect. But there is disconnect even when nothing happening(i mean no event or operation calls), though it takes some time, maybe half an hour. In the game with about 20 messages per second it may disconnect in 10 seconds, may disconnect in 10 minutes. In the home screen of application, when no there is no messages disconnect takes awhile.
No matter, editor or webplayer, I run both simultaneously, and both were disconnected at one time.
Server on the localhost.

[code2=csharp]peer.IsSimulationEnabled = true;
peer.NetworkSimulationSettings.IncomingJitter = 10;
peer.NetworkSimulationSettings.OutgoingJitter = 10;
peer.NetworkSimulationSettings.IncomingLag = 100;
peer.NetworkSimulationSettings.OutgoingLag = 100;
peer.NetworkSimulationSettings.OutgoingLossPercentage = 5;
peer.NetworkSimulationSettings.OutgoingLossPercentage = 5;[/code2]

server log
2013-10-02 02:37:55,015 [14] DEBUG Photon.SocketServer.ApplicationBase [(null)] - OnDisconnect - ConnID=0
2013-10-02 02:37:55,015 [16] DEBUG Photon.SocketServer.PeerBase [(null)] - Peer 0 changed state from Connected to Disconnected
2013-10-02 02:37:55,015 [16] DEBUG ZServer.ZPeer [(null)] - ZPeer.Reset: peerId=0
2013-10-02 02:37:55,015 [16] DEBUG ZServer.ZPeer [(null)] - ZPeer.OnDisconnect: peerId=0, reason=TimeoutDisconnect, reasonDetail=
0 - 1659 - 0 - 0 - 36413406 - 36432750 - 19344
1 - 1659 - 36424625 - 7488
2 - 1659 - 36418531 - 5125
3 - 1659 - 36415484 - 2078
4 - 1659 - 36414437 - 1031
5 - 1658 - 202 - 8 - 36411390 - 36411578 - 188
6 - 1657 - 203 - 6 - 36410171 - 36410375 - 204
7 - 1656 - 203 - 7 - 36408937 - 36409140 - 203
8 - 1655 - 203 - 9 - 36407703 - 36407921 - 218
9 - 1655 - 36407703 - 1219
10 - 1654 - 201 - 8 - 36405265 - 36405453 - 188
11 - 1653 - 202 - 6 - 36404046 - 36404250 - 204
12 - 1652 - 202 - 7 - 36402828 - 36403015 - 187
13 - 1651 - 204 - 5 - 36401609 - 36401812 - 203
14 - 1650 - 204 - 6 - 36400390 - 36400593 - 203
15 - 1649 - 204 - 8 - 36399171 - 36399375 - 204
16 - 1648 - 204 - 10 - 36397921 - 36398109 - 188
17 - 1647 - 206 - 8 - 36396687 - 36396890 - 203
18 - 1646 - 206 - 10 - 36395453 - 36395671 - 218
19 - 1645 - 205 - 9 - 36394218 - 36394437 - 219
20 - 1644 - 204 - 8 - 36392968 - 36393187 - 219
21 - 1643 - 202 - 6 - 36391718 - 36391921 - 203
22 - 1643 - 36391718 - 460
23 - 1642 - 202 - 7 - 36390218 - 36390421 - 203
24 - 1641 - 202 - 9 - 36388968 - 36389171 - 203
25 - 1640 - 202 - 11 - 36387718 - 36387906 - 188
26 - 1639 - 203 - 10 - 36386500 - 36386703 - 203
27 - 1638 - 203 - 13 - 36385265 - 36385453 - 188
28 - 1637 - 205 - 13 - 36384046 - 36384234 - 188
29 - 1636 - 207 - 12 - 36382812 - 36383031 - 219
30 - 1635 - 206 - 12 - 36381593 - 36381796 - 203
31 - 1634 - 206 - 15 - 36380359 - 36380546 - 187
32 - 1633 - 208 - 14 - 36378843 - 36379031 - 188
33 - 1632 - 210 - 12 - 36377609 - 36377812 - 203
34 - 1631 - 211 - 14 - 36376359 - 36376593 - 234
35 - 1630 - 208 - 12 - 36375093 - 36375296 - 203
36 - 1629 - 208 - 14 - 36373843 - 36374031 - 188
37 - 1628 - 210 - 12 - 36372328 - 36372546 - 218
38 - 1627 - 209 - 13 - 36371078 - 36371265 - 187
39 - 1626 - 212 - 10 - 36369515 - 36369718 - 203
40 - 1625 - 213 - 10 - 36368265 - 36368484 - 219
41 - 1624 - 213 - 12 - 36367046 - 36367250 - 204
42 - 1623 - 214 - 13 - 36365812 - 36366031 - 219
43 - 1622 - 214 - 15 - 36364531 - 36364765 - 234
44 - 1621 - 212 - 13 - 36363031 - 36363250 - 219
45 - 1620 - 211 - 16 - 36361765 - 36362000 - 235
46 - 1619 - 208 - 13 - 36360562 - 36360750 - 188
47 - 1618 - 210 - 10 - 36359312 - 36359531 - 219
48 - 1617 - 209 - 10 - 36358078 - 36358296 - 218
49 - 1616 - 208 - 10 - 36356843 - 36357046 - 203, CCU=0
2013-10-02 02:37:55,015 [16] DEBUG Photon.SocketServer.PeerBase [(null)] - Peer 0 changed state from Disconnected to Disposed

last lines of unity log
...
Photon: Resending: NC(255|5 r/u: 1709/0 st/r#/rt:2142391/1/2152391). times out after: 260 sent: 2142391 now: 2142656 rtt/var: 224/9 last recv: 31
Photon: Resending: NC(255|5 r/u: 1725/0 st/r#/rt:2162313/1/2172313). times out after: 254 sent: 2162313 now: 2162578 rtt/var: 214/10 last recv: 281
Photon: Resending: NC(255|5 r/u: 1725/0 st/r#/rt:2162578/2/2172313). times out after: 508 sent: 2162578 now: 2163094 rtt/var: 214/10 last recv: 797
Photon: Resending: NC(255|5 r/u: 1725/0 st/r#/rt:2163094/3/2172313). times out after: 1016 sent: 2163094 now: 2164125 rtt/var: 214/10 last recv: 1828
Photon: Resending: NC(255|5 r/u: 1725/0 st/r#/rt:2164125/4/2172313). times out after: 2032 sent: 2164125 now: 2166188 rtt/var: 214/10 last recv: 3891
Photon: Resending: NC(255|5 r/u: 1725/0 st/r#/rt:2166188/5/2172313). times out after: 4064 sent: 2166188 now: 2170266 rtt/var: 214/10 last recv: 7969
Photon: Timeout-disconnect! Command: NC(255|5 r/u: 1725/0 st/r#/rt:2170266/6/2172313) now: 2178406 challenge: 4a3c3ce0
PhotonHandler.OnStatusChanged: TimeoutDisconnect
Photon: StopConnection()
When I turned simulation off, it was fine, 50 minutes without disconnection.
\deploy\bin_win32_xp
== Core ==
PhotonSocketServer.2010
Win32 Unicode Release XP
BuildDate: 2013-02-08 15:06:52
Version: 3.2.6.2037
SVN repository: photon-socketserver
SVN revisions of...
... this project: 2037
== SDK ==
BuildDate: 2013-02-08 15:19:44
Version: 3.2.10.4248
SVN repository: photon-socketserver-sdk
SVN revisions of...
... this project: 4248

Photon-Unity3D_v3-2-1-6_SDK

Comments

  • Hi ximael,

    thanks for the bug report! We are aware that there is a but with (too) frequent timeout disconnects, especially when network quality is bad - we are working on it with high priority, but it might take some more time until we have a fix ready.

    For now, you can only increase the "MinimumTimeout" and "MaximumTimeout" settings in PhotonServer.config - which might have the side effect that it takes longer until you notice "real" timeouts.