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 ?
Answer by Brandon Phillips · Feb 19, 2021 at 11:59 PM
@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?
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).
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?
Call to ReadyForPlayers function is blocking forever 2 Answers
Multiplayer server not showing in matchmaking 1 Answer
Backfill tickets not being properly cancelled 1 Answer
CreateMatchmakingTicket returning 500 errors randomly 1 Answer
Server does not transition to Terminating after successful shutdown request 1 Answer