Getting TimoutDisconnect from Photon Server

As of 1.10+ we're getting a lot of
OnConnectionFail, StatusCode: TimeoutDisconnect
from our Photon Server. We're running our own Photon Server from the latest downloadable SDK (v3-0-19-2868-RC8).

It happens approximately 70-80% of the time that we try to connect and create a game. Could this issue be caused by the server not being up to date? Has the cloud been updated, but not the downloadable Server SDK?

Comments

  • Sounds more like a problem with your connection to your own server.
    Do you route it through the internet to your machine?
    Or are you running it on a dedicated machine somewhere (virtual ones are a bit risky as you never know if there is enough resources to respond in time. Or worse: you could be on amazon EC2 in which case the latency on the networking itself can exceed the default timeout timeframe on its own)
  • Yep, it's routed through the Internet to a different machine in the office.

    What's wierd is that we do get a call to OnConnectedToPhoton(). The TimeOut doesn't connect till after we call PhotonNetwork.CreateRoom().

    If I never call CreateRoom, I get into the Lobby and can linger there with no problem for any amount of time. No timeouts occur then.
  • sure that the GameServers are properly configured etc?

    Did you also check the logs of the game servers to see if they output something of relevance?
  • It seems to have been a timing issue. When creating a game in OnConnectedToPhoton, rather than in OnJoinedLobby, it would most of the time result in a timeout. In older versions of PUN this wasn't an issue. After initial testing, we still get the timeout disconnect, but far less often than before.
  • OnConnect is maybe misleading in PUN. This only means the connection itself is established. Internally, the loadbalancing flow is still executing a few operations on the server. The end of this flow is OnJoinedLobby, cause the default flow gets you into the lobby as well.
    There is a property "autojoinlobby", which you could set to false. The description in PUN names the event that becomes the final one then.
Sign In or Register to comment.