question

lukaskebel avatar image
lukaskebel asked

Playfab Server Behavior (Server Initializing/Archiving/Restarting)

We have some Kind of strange server behavior. What happens is this. The first few sessions of our game are played without Server Restarting. It seems the matchmaking works, tickets are created. Matches are played out correctly. After some time, servers do restart after the game. going to initializing - Archiving & after that to standby, taking a long time to go to standby.

Is it meant to work this way? Do the servers have to restart after every game session?

Custom Game Servers
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

·
Neils Shi avatar image
Neils Shi answered

Do the servers have to restart after every game session?

Yes, When the game session ends, you should terminate the game server process so that you can get a new game server. And when this happens, MPS will: remove the container/process running this game server, collect and upload the game logs so they are ready for archival (more info), create a new container/process in its place to replace the one that was terminated.

Then the game server transitions to Initializing and StandingBy, it may take some time due to the above behavior, the time also depends on your server's functionality and logic code. For more detail, you can refer to Lifecycle of a multiplayer server.

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.

lukaskebel avatar image lukaskebel commented ·

as a follow up Our Servers still do not change into the shutdown every time they should. i want to send a autmatically command to the server to do that. Which approach would be the best with playfab to attach a script like that?

0 Likes 0 ·
Neils Shi avatar image Neils Shi lukaskebel commented ·

Generally, if you integrate GSDK with the custom server correctly, PlayFab will shut down the server session when your game server application exits. So, you can implement the method to exit your game server when the match is over. You can check this doc Gracefully shutting down your game server for more detail.

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.