question

Brent Batas (Lisk) avatar image
Brent Batas (Lisk) asked

What does the multiplayer server state "PendingHeartbeat" mean?

What does the multiplayer server state "PendingHeartbeat" mean? My newly deployed server is stuck in that state.

I tried searching the forums and documentation, but couldn't find anything about it.

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

·
Sarah Zhang avatar image
Sarah Zhang answered

It means "PlayFabVmagent is waiting for heartbeats from the game server". If this state is over, it will become Standingby state. It shouldn't take too long. Could you get heartbeats successfully when you locally debugged it? If you could, how much time did your server state stay on Pendingheartbeats?

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

Brent Batas (Lisk) avatar image Brent Batas (Lisk) commented ·

Unfortunately, I'm unable to get the heartbeats successfully on the local server. I'm able to do it with the WindowsRunnerCSharp sample, but not with my own server.

My own server just runs this code and nothing else: gsdk-attempt.txt
The logs suggest it makes it to ReadyForPlayers and is blocked there. I don't see any CurrentGameState messages.

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Brent Batas (Lisk) commented ·

I tried the following code in my server, it works fine. In additon, please ensure your GSDK version is the latest.

 
try
{ 
GameserverSDK.Start();
}
catch(Microsoft.Playfab.Gaming.GSDK.CSharp.GSDKInitializationException initEx)
{
LogMessageService.LogMessage("Cannot start GSDK.Please make sure the MockAgent is running.",false); 
LogMessageService.LogMessage($"Got Exception: {initEx.ToString()}",false);
return;
}
catch (Exception ex) 
{ 

LogMessageService.LogMessage($"Got Exception: {ex.ToString()}", false);

}
 GameserverSDK.RegisterShutdownCallback(OnShutdown);
 GameserverSDK.RegisterHealthCallback(IsHealthy);
 GameserverSDK.RegisterMaintenanceCallback(OnMaintenanceScheduled);
if(GameserverSDK.ReadyForPlayers()) 
{
  //add code that should run after server allocation   
 
}
else
{ 
  LogMessageService.LogMessage("Server is getting terminated."); 
}  
0 Likes 0 ·
Daniel avatar image Daniel Sarah Zhang commented ·

@Sarah Zhang I tried exactly the same. PlayFabVMAgent says everything is fine and the status becomes Active. When I upload the same build to the PlayFab - it becomes "Unhealthy" and server details say that server is stuck at PendingHeartbeat state.

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.