question

Ben avatar image
Ben asked

MultiplayerServerTooManyRequests - NoHostsAvailableInRegion

I've followed the fake game tutorial: https://learn.microsoft.com/en-us/gaming/playfab/features/multiplayer/servers/wrapper-sample

I get to the point where I connect as a client and it works as expected but only one time. When trying to reconnect I get an Exception "MultiplayerServerTooManyRequests - NoHostsAvailableInRegion - No Hosts available in regions 'SouthCentralUs,EastUs2,NorthCentralUs,EastUs,CentralUs,WestUs,NorthEurope,BrazilSouth,WestEurope,JapanEast,JapanWest,SoutheastAsia', please retry. Unhandled exception: System.Exception: Allocation failed with HttpStatus=TooManyRequests at WindowsRunnerCSharpClient.Program.Run(String titleId, String playerId, String buildId, Boolean verbose) "

I've seen a number of posts on this topic but no solution my issue. I have waited hours and the servers never get released. I can only get this to work again when I create a new build. At that point it works once and then never again.

multiplayer
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

·
Xiao Zha avatar image
Xiao Zha answered

It usually indicates that there are no available servers in the current region, you'll need to increase the number of total servers by increase the “Maximum” number in your Build “Regions” page or close the active server instance manually in the server instance page. You may refer to Build definition and configuration - PlayFab | Microsoft Learn to have more information about the Build configuration and Servers overview page - PlayFab | Microsoft Learn to have more information about the server instance.

In addition, the wrapper sample provides a GET routes for you to terminate the server, and there is no code to automatically terminate the program in the sample. Therefore, the server instance will not be automatically terminated, and you need to manually shut down the server externally. This is why your server never gets released.

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.

Ben avatar image Ben commented ·

Thank you. I started doing two things:

  • creating a single session ID and reconnecting to it

  • running the /terminate endpoint

This helped a lot!

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.