question

Curtis Pelissier avatar image
Curtis Pelissier asked

Randomly, players can't connect to the server

Hello,

We are working on a versus game which uses the Matchmaking feature with the "Enable server allocation" feature.
The matchmaking works perfectly, it matches my two players and send them the informations of the server (ip address, port, regions...) but randomly, my two players can't connect to the server.

So, I tried to retrieve the server logs to understand, but there is no active server and I can't find which server was deployed. I only get the match id with server ip/port, and that's all.

And, when I say "randomly", that's why my players can play 3 times in a row without problems, and suddenly the next time they can't connect to the server.

We are using Unity 2020.2.2f1 with Mirror 30.4 and my game id is 8E952.

Any idea of which problem it could be ?

multiplayerMatchmaking
10 |1200

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

1 Answer

·
brandon@uprootstudios.com avatar image
brandon@uprootstudios.com answered

@Curtis Pelissier How many servers do you have running in Standby? Is it possible that you aren't shutting down servers when your games complete and those 3 games in a row are still Active so there aren't any other servers to allocate?

2 comments
10 |1200

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

Curtis Pelissier avatar image Curtis Pelissier commented ·

I'm doing exactly the same than the Mirror sample : when the numbers of players falls to 0, I call the PlayFabMultiplayerAgentAPI.UpdateConnectedPlayers() to update and an Application.Quit() to close the server build.

That's true, there still is the game session opened on my gamemanager playfab with 0 players but when I read the logs, the server is closing at the right timing (like ~5 seconds after my players left).

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Curtis Pelissier commented ·

When you say "Player can't connect to the server", do you mean they get the IP and Port successfully, but can't connect to it? Or you do mean they can't get the server detials like IP and Port?

-1 Like -1 ·

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.