archadia avatar image
archadia asked

Playfab Multiplayer Server Windows Container and Process

I have created a project that uses the agentListener and UnityNetworkServer from MPSsample. The project works in linux with UDP(KCP), both on local and in Playfab multiplayer server. But ı cant get it to work as Windows Container/Process.(Project is in unity btw.)

When i try Container,

in Local;

I can get it to work until "Waiting for heartbeats from the game server.....". but after that it doesnt do anything in docker it says it is "StandingBy" an it is Healthy. I can connect it even though it is not active.

in Playfab Multiplayer Server;

There are 3 thing that happen in this case;

1. I can connect and my player loads with the scene, ı can move for a bit but ı cant interact with interactables. Also i am kicked out after sometime. Yeh player count in server increases and my playfab id is listed in server details in playfab. not removed when ı disconnect.

2. On the top left it says ı am connected and a "Client Ready" button appears (the one from Mirror). but scene doesn't load. this happens sometimes form the start and mostly after getting kicked once. also in the first case where it happens even in the first time session is active but my Playfab id is not in it.

3.The Scene loads but the player doesn't. I cant do anything.

Also when i connected and my friend tried to connect as well. they can't it says it is connected on the top left but it is the same situation as the 2nd case.

My build is server build, and it is x86_64. my .json file is as such

  "RunContainer": true,
  "OutputFolder": "C:\\output\\UnityServerWin",
  "NumHeartBeatsForActivateResponse": 10,
  "NumHeartBeatsForTerminateResponse": 150,
  "AgentListeningPort": 56001,
  "AssetDetails": [
      "MountPath": "C:\\Assets",
      "LocalFilePath": "D:\\Desktop\\User\\Unity Mirror Playfab\\Builds\\ServerBuild_Windows\\"
  "DeploymentMetadata": {
    "Environment": "LOCAL",
    "FeaturesEnabled": "List,Of,Features,Enabled"
  "GameCertificateDetails": [],
  "PortMappingsList": [
        "NodePort": 56100,
        "GamePort": {
          "Name": "game_port",
          "Number": 7777,
          "Protocol": "TCP"
  "ProcessStartParameters": {
    "StartGameCommand": "Server.exe -nographics -batchmode -logFile"
  "ContainerStartParameters": {
    "StartGameCommand": "C:\\Assets\\Server.exe -nographics -batchmode -logFile",
    "ResourceLimits": {
      "Cpus": 0,
      "MemoryGib": 0
    "ImageDetails": {
      "Registry": "",
      "ImageName": "playfab/multiplayer",
      "ImageTag": "wsc-10.0.17763.973.1",
      "Username": "",
      "Password": ""
  "SessionConfig": {
    "SessionId": "ba67d671-512a-4e7d-a38c-2329ce181946",
    "SessionCookie": null,
    "InitialPlayers": [ "Player1", "Player2" ]
  "TitleId": "",
  "BuildId": "00000000-0000-0000-0000-000000000000",
  "Region": "NorthEurope"

ı have tried many different approaches but none of them worked. Is there anyone else who has the same issue.Please help. Thanks.

Also when i try Windows Process;

It just doesn't work for both local and Playfab Multiplayer Server, but ı am trying for container anyway so ı am not gonna give details. But just in case ı am giving a rough outline of the situation;

In local;

state becomes active but ı cannot connnect with 7777,56100,56001.

in 7777 and 56001 case it says is it connected on the top left but scene doesnt change to online scene.

In Playfab Multiplayer Server;

It becomes active but ı cannot connect.

Codes are mostly Copy paste from AgenListener.cs and UnityNetworkServer.cs, there are small tweeks but nothing is changed about connections itself.

I have also tried to setup and use UnityServer project but couldnt connect to it.

Everything about the game works in linux with KCP btw(interactions, movement sync etc.). But i need it on windows.

Sorry for the long post.

unity3dwindowsCustom Game Serversmultiplayer
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

Dimitris-Ilias Gkanatsios avatar image
Dimitris-Ilias Gkanatsios answered

Thanks for reaching out!

- On your first question, the server should transition to Active after 10 seconds. Maybe something is blocking on your code?

- On your other question about process mode, you should grab the port from GSDK and then use it to instantiate your server. Check the code here: MpsSamples/AgentListener.cs at main PlayFab/MpsSamples (

You should check your firewall for any closed ports as well.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

archadia avatar image archadia commented ·

- I have added some debug to my code, code can call ReadyForPlayers but it doesn't Call StartLİstening because state stays at Standingby.

- Also thanks for the Process mode answer, I had removed it because it was for process mode then i forgot i removed it.

0 Likes 0 ·
archadia avatar image archadia archadia commented ·

Update: After Adding the port part of AgentListener. Process is now stuck at Initializing. I am not sure what ı am doing wrong. ı havent tried the process mode on the UnityServer project form playfab but ı assume same would happen since it doesnt work as a container as well.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ archadia commented ·

Heartbeat is simply scheduled https calls to track the server build health state, if it is pending on waiting for heartbeat, or even is stuck on initializing, there should be issues on your code. We have provide tutorials of debugging on both process mode and container mode.

But I will suggest checking if it is lack of DLLs -- Determining required DLLs for Windows game servers - PlayFab | Microsoft Docs

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.