question

contact-3 avatar image
contact-3 asked

gamelobby_ended without any cause

I'm using playfab for more than 1 year now developing with external servers.

But since a couple of days my servers end on their own, even when no actions are made, without any visible causes after approximately 2 minutes. I invite you to check on our game E347, you can see a long game_start, game_ended list of events with a 2-3 minutes interval

There is only one path in code I call deregister and no breakpoints triggers there.

Here is the type of gamelobby_ended event I can see on playfab event stream.

{
    "EventName": "gamelobby_ended",
    "EventNamespace": "com.playfab",
    "EntityType": "gamelobby",
    "Source": "PlayFab",
    "TitleId": "E347",
    "GameMode": "GM_MATCHMAKER",
    "Region": "EUWest",
    "ServerBuildVersion": "main_build",
    "ServerHost": "127.0.0.1",
    "ServerIPV6Address": null,
    "ServerPort": 20120,
    "ServerHostInstanceId": null,
    "Tags": null,
    "EventId": "ec5da43e2f3141b2ac35ee6a46262537",
    "EntityId": "9FA94BF5FAB432B2",
    "SourceType": "BackEnd",
    "Timestamp": "2017-12-19T17:13:40.8270592Z",
    "History": null,
    "CustomTags": null,
    "Reserved": null
}

Is there something new on your side or am I missing something ?

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

·
pfnathan avatar image
pfnathan answered

We have looked up the counter for it and we can confirm that termination of your lobbies was due to lack of heartbeat.

The heartbeat is required every 2 minutes. If the game server does not phone into our system we assume it is not healthy and we terminate it.

For more details, please see: https://api.playfab.com/docs/multiplayer-servers

Bringing in Discovery

PlayFab maintains a registry of all game instances running and which players occupy the slots in those games. To achieve this, each server instance should Register with PlayFab, post an occasional Heartbeat, and Deregister itself before termination.

https://api.playfab.com/documentation/server/method/RefreshGameServerInstanceHeartbeat

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

contact-3 avatar image contact-3 commented ·

Can you confirm it's indeed a new and recent behaviour? It'll be easier to troubleshoot.

0 Likes 0 ·
brendan avatar image brendan contact-3 commented ·

Yes, the timeout on the heartbeat for externally hosted servers was only being applied in cases where we'd been notified that the title was using external servers previously. We've since updated to have the timeout work as described in our documentation and tutorials consistently.

1 Like 1 ·
contact-3 avatar image contact-3 brendan commented ·

Adding RefreshGameServerInstance did the trick. Again, we really appreciate the customer service, though prior communication would be of great help. Don't you have a technical newsletter ?

0 Likes 0 ·
Show more comments

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.