question

Robyn To avatar image
Robyn To asked

Multiplayer Servers Keep Starting up

We keep seeing extra servers spinning up (seemingly on their own). Is this expected?

In this screenshot I have pulled 12 logs that appeared in Archive Servers. Only 4 of the logs are for servers that were actually requested by players, the other 8 have no matching RequestMultiplayerServer call.

6252-image.png

Our servers are Unreal and we do an autoshutdown if there are no players for 50 seconds. It seems as though one server shutting down triggers another coming online. When chatting with PlayFab offline, they are saying this is expected behavior...but this does not happen with our other game. Is this expected? Or familiar?

multiplayer
image.png (6.1 KiB)
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

We keep seeing extra servers spinning up (seemingly on their own). Is this expected? In this screenshot I have pulled 12 logs that appeared in Archive Servers. Only 4 of the logs are for servers that were actually requested by players, the other 8 have no matching RequestMultiplayerServer call.

If by “We keep seeing extra servers spinning up” and “the other 8 have no matching RequestMultiplayerServer call” you mean the standing by server instance is constantly being terminated and created without the player requesting the server instance, how do you implement the auto-shutdown server logic? And when do you start the 50 seconds countdown? If you start the count down at Standing by state and nobody request the server instance, after 50s, the standing by server will be terminated, then game process will be removed, server log will be archived and new server instance will be created and become standing by server instance, then it will continue the server terminate loop.

It seems as though one server shutting down triggers another coming online. When chatting with PlayFab offline, they are saying this is expected behavior...but this does not happen with our other game. Is this expected? Or familiar?

As you can see in this documentation: Lifecycle of a multiplayer server - PlayFab | Microsoft Learn, PlayFab Multiplayer Server will create a new container/process in its place to replace the one that was terminated. So, “one server shutting down triggers another coming online” is an expected behavior.

3 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.

Robyn To avatar image Robyn To commented ·

If I shutdown the server in Active state, will a new process not start? I believe our issue is that new servers are spinning up into Active state and the actual Server.exe process is starting

0 Likes 0 ·
Robyn To avatar image Robyn To Robyn To commented ·

@Xiao Zha maybe this is happening?

Terminating a game server process

When the game session ends, you should gracefully terminate the game server process so you can get a new game server. If the game server process crashes, MPS will create a new game server process to replace the one that crashed. In the event that the game server is stuck or frozen, you can always call the ShutDownMultiplayerServer API to manually terminate the game server process. This API should be called only when the game server process cannot terminate by itself. When you call this API, you will see the game server transitioning to "Terminating" and "Terminated" state. Moreover, any servers stuck in the terminating or terminated state will be replaced by the system after a period of time.

Do you know how I would see if the process is considered a crash? I don't see anything in the GSDK logs (I'm using Unreal)

0 Likes 0 ·
Dimitris-Ilias Gkanatsios avatar image Dimitris-Ilias Gkanatsios Robyn To commented ·

We currently don't track the exit code of the game server process. Is there a "global exception handler" (or something similar) in Unreal that could be used to track an exception? Moreover, any chance you can use LocalMultiplayerAgent to repro locally?

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.