question

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

What does the matchmaker ticket "WaitingForServer" mean? (Matchmaking 2.0)

I'm running into a frequent issue where my clients get stuck with the status WaitingForServer.

https://i.imgur.com/hCpM32M.png

As you can see in the console logs, they get the status WaitingForMatch first, then a match is apparently found, but they get stuck on WaitingForServer next.

This is confusing to me, because there is a server on StandBy, which should be ready to accept new players:

https://i.imgur.com/Pt44kZI.png

Additionally, even if that server had errors or otherwise was unable to take new players, shouldn't another one spin up?

https://i.imgur.com/HDoVpVW.png

I also tried RDP'ing into the server, but I just was presented with a command prompt and don't know what to do next.

I'm currently using the GSDK sample, setup with these steps:

https://api.playfab.com/docs/tutorials/landing-tournaments/multiplayer-servers-2.0/quickstart-for-multiplayer-servers-ux

Thanks!

Custom Game ServersMatchmaking
10 |1200

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

Citrus Yan avatar image
Citrus Yan answered

Hi, according to your description, the client connects to the sever successfully from time to time which means the servers do work. I noticed that you followed the “Quickstart for multiplayer servers” tutorial in which the “servers per machine” option is set to one, so I suspect that this issue happens due to that VM capacity cannot satisfy your frequent requests. I think you could try to change the “servers per machine” and “Maximum servers” option to a bigger value to see if this issue still happens. Any issues let us know:)

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.

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

Hi Citrus, thanks for the reply. What is the difference between "servers per machine" and "maximum servers"? I just realized now that they are different things.

Is "servers per machine" the number or virtual servers per physical machine, and "maximum servers" is the number of total...virtual machines? or physical machines?

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Brent Batas (Lisk) commented ·

Hi Brent, as far as I am aware, “servers per machine” means the maximum number of game servers that should be operated on a single virtual machine. “maximum servers” means the maximum number of game servers to operate in the specified region. For instance, let’s assume that now you have the QUOTA of 8 Av2 cores in the region of EastUS, you create a build using “Standard_A2_v2 (2 cores)” virtual machine and set “servers per machine” to be 2. Now this build is configured to have 2 servers per machine. Since there are 2 cores per Standard_A2_v2 machine, each server requires 1 core. So if you set ”Maximum servers” to be 8, you will require 100% of remaining capacity(8 Av2 cores). If a new server is required by the player when the 8 servers are occupied, Playfab will wait for one of the servers to terminate and then allocate it to the player.

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

Hi @Citrus Yan

thank you for the response. I'll let you know if I experience any further issues.

Also it's useful to know that each server corresponds to 1 core. What would happen if I tried to set servers per machine to something like 10, when the machine only had 8 cores? Would PlayFab throw some kind of error, or would the server performance just silently be much slower, because the cores need to be shared?

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Brent Batas (Lisk) commented ·

Hi Brent, If you set servers per machine to 10 when the machine only had 8 cores, then each server corresponds to 0.8 core. The more servers you set to one machine, the more compute power needs to be shared. You need to do some pressure test to see how many of your custom servers should be set to one machine because different game server requires different amount of compute power.

1 Like 1 ·
brandon@uprootstudios.com avatar image
brandon@uprootstudios.com answered

I think WaitingForServer means that it is waiting for the server to respond to the allocation call

Something in your server-side code is probably broken, maybe it never calls ReadyForPlayers?

1 comment
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 ·

I'm just using the standard GSDK sample with no modifications. I just assumed it is calling ReadyForPlayers correctly based on reading the code and based on the fact that it is an official code sample.

What's weird is if I wait awhile (I can't tell exactly how long), then retry the client code, it will connect to the server successfully. Then when I retry after a short period of time, it fails with WaitingForServer.

0 Likes 0 ·
Jason Andersen avatar image
Jason Andersen answered

Hello Brent,

Have you figured out what was happening? Because I have the same problem. If I test the game locally using MockVmAgent works fine, but if I try to connect to the server, the first time the clients find the server but the next times the response is allways "WaitingForServer"

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.

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

Hey @Jason Andersen the issue is the first server is still up and running, and with only 1 standby server and 1 server per machine, it means the second time the server is requested, it needs to wait for a new server to spin up. This results in the "WaitingForServer" result.

In theory if you kept polling, you would eventually be able to connect to the new server, but I haven't tested this yet.

0 Likes 0 ·
Jason Andersen avatar image Jason Andersen Brent Batas (Lisk) commented ·

Thanks for your answer Brent, I'm going to try that and see what I get =) .

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.