question

natepac avatar image
natepac asked

MultiplayerServerTooManyRequests

I am still working through getting setup with Unity / Mirror / PlayFab, as per my other couple posts on other issues. I want to use PlayFab for multiplayer and it's other awesome features (I have used them before) so I am trying to work through this. I have gotten a server deployed, now I am trying to get an actual game client and server connected and playing a game. I am currently using uMMORPG, wiring up the PlayFab SDK based off your examples and going from there. I now have clients connecting but while testing in editor to remote servers on PlayFab I get:

/MultiplayerServer/RequestMultiplayerServer PlayFabError(MultiplayerServerTooManyRequests, MultiplayerServerTooManyRequests - NoHostsAvailableInRegion - No Hosts available in regions 'WestUs', please retry., 429 429)

This is after connecting about 20 or so times in editor while testing things. I am disconnecting with Mirror every time and I am not seeing a smoking gun in the console.

TitleID: 6DE50

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

·
natepac avatar image
natepac answered

In short, you need to make sure your Servers are exited when you have no more players in the game. You need to do this manually on your Unity Server. Here is an answer I got from Uproot Studios in Slack:

So PlayFab just checks that the process has exited to return the server to the allocation pool. So you need to do something to shut down the server when the game is finished. What we do is pretty simple:

When a player disconnects, check the amount of players in the game

If the amount of players is 0, all players have disconnected, call Application.Quit()

1 comment
10 |1200

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

Citrus Yan avatar image Citrus Yan commented ·

Yes indeed, if servers are not shut down after the game is finished they will still take up one slot in the allocation pool, so we need to make sure they are closed when games are finished, thanks for the info:)

0 Likes 0 ·

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.