question

kristiankraljevic-1 avatar image
kristiankraljevic-1 asked

Photon Fusion - Server deployed - After a while clients can't connect,Playfab - Photon Fusion - Once deployed the client can't connect.

Hello,

We are developing an open-world game where many players can play together in the same world. We are using photon fusion for networking and want to deploy our game on your playfab server.

What we need from a playfab gameserver is just a vm that runs our game in server mode and keeps running it.

We have already set up the connection between our appid (photon fusion) and the project created on playfab thanks to your add-in available in the dashboard.

We tested the behavior of the server with the local MPS agent and everything works, when we start the local MPS agent it generates heartbeats and when we connect as a client everything works fine, we can connect and play together.

When we create a build on playfab using the same parameter we have in the multiplayersettings.json file everything works fine, the server gets the green "Deployed" status, but after a while, maybe 20 minutes or some hours, I can't play and connect as a client, it returns an error. [Fusion] Fusion.StartGameException. StartGameException: Error --> Fusion.NetworkRunner.StartGameModeCloud.

If I start the game from unity as a server it should throw an exception saying that there is already a server in the room but it doesn't (because it should be running from the playfab server), if I play as a server from unity it doesn't throw the exception so I assume that on the server the application has stopped for some reason.

Another information is that we are not using any port to connect as a client because we are using photon cloud, so we are connecting through the photon fusion app id. When we create the build in playfab, we have to provide a port and we have provided port 7777 with UDP protocol but because we are using photon fusion we are connecting directly to their clouds so we don't need any port.

Do you perhaps know where I can find more information on why I am getting these errors? Is there a log file that keeps track of all the connections established on the server or the ones that failed? Is there a reason why the server should stop playing after a while? Maybe when it doesn't see clients connected through the configured port?

photonCustom Game Servers
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Xiao Zha avatar image
Xiao Zha answered

First, if “What we need from a playfab gameserver is just a vm that runs our game in server mode and keeps running it.” means you want a long-running server for players to play together, since PlayFab multiplayer server is designed for session-based games, if you need to have servers running for more than a few days at a time, I would not recommend using our server hosting for that. You may try to use Azure Game Servere Hosting service. If I understand wrong, please let me know.

Second, do you request the server instance (call Request Multiplayer Server API) before trying to connect to the server? Does “but after a while, maybe 20 minutes or some hours, I can't play and connect as a client” means you can connect to the serve at the beginning, then after a while, your server instance still in active status but you cannot connect to it? And where do you get the error message? Could you share the full error log and server log (obtained from Archived Servers Page after server instance is shut down)?

In addition, the server cannot receive data if the firewall doesn’t open the necessary ports (such as the ports that Fusion uses). Though you set a port 7777 but Photon Fusion service may need specific ports. You may seek professional help from Fusion support team to open the correct ports for Fusion service.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

kristiankraljevic-1 avatar image
kristiankraljevic-1 answered

Hi, Thank you very much for your answer! At the end we decided to follow the Azure Game server hosting server you suggested.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Matteo avatar image
Matteo answered

Hi, sorry for replying to an old thread. We are having the same EXACT problem and can't seem to spot any cause or solution, did you ever find out what was it caused to? I'll be grateful to anyone answering, thank you.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.