Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question When first client joins, fleet capacity reaches maximum

Discussion in 'Matchmaker' started by Chewie40, Aug 11, 2023.

  1. Chewie40

    Chewie40

    Joined:
    Jan 31, 2022
    Posts:
    1
    I apologise if this is a common mistake, I am a newbie using UGS and matchmaker.

    I have a fleet configured to use a single server that boots up when the first client tries to connect.

    When the first client matchmaking ticket times out, a second connection attempt manages to achieve the connection successfuly. However, when a new client tries to join the match it gets the message "MultiplayAllocationError: request error: maximum capacity reached".

    Inspecting the fleet analytics shows the following situation:

    upload_2023-8-11_16-40-31.png

    Why are all the available user slots allocated at once? the matchmaker analytics show only 1 ticket and 1 match created.
     
  2. unity_pTyVCICth8FYFw

    unity_pTyVCICth8FYFw

    Joined:
    Jun 2, 2022
    Posts:
    2
    bumping this forum, anyone know why this happens?
     
  3. jackward84

    jackward84

    Joined:
    Jan 26, 2017
    Posts:
    87
    According to previous conversations I've had about this, the matchmaker only waits for a short amount of time for a new server to become available once it finds a match. If the server fails to be available in this arbitrary amount of time, it will put the ticket back in the pool to attempt to find another match. The result of this behaviour is that it will continue booting up more and more servers until one starts in the amount of time that the matchmaker deems acceptable OR it causes you to reach server capacity and get a MultiplayAllocationError. This means a single ticket match can spin up a ton of servers if the servers had to cold boot and none of them became available in the time the matchmaker deemed acceptable.

    Quote from Unity in another thread:

    The behaviour you are describing is linked to the fact that when updating image on Game Server Hosting, it takes more time for a server to spin up for the first allocations request coming from matchmaker.
    What happens internally in matchmaking is that after a match is made, matchmaker request san allocation to Game Server Hosting. In the process of updating an image, this allocation will take a bit more time that usual.
    After a lille while, matchmaker will cancel the match and put back the ticket in matchmaking, therefore requesting a new allocation. The reason we put the ticket back in matchmaking is that is a normal matchmaking process for a live game, we try to put players as fast as possible in a match. So if an allocation takes too much time, there is a possibility that in between a request for backfill as been created that is suitable for the players.
    This is the behaviour you are seeing. We will update the FAQ to describe it better.
    Thing is this behaviour doesn't only result from updating the server image, it also results from simply having to cold boot servers. As a developer using Unity Game Server Hosting + Matchmaker, I'm not sure there's anything we can do to resolve this issue ourselves, it is in Unity's hands. As far as I'm aware, Unity doesn't consider this an issue.