Unable to reserver a process on fleet ( FleetCapacityExceededException)
I have created a game fleet for my game. In Fleet Setting, i set concurrent process to 10. REMOVEDUPLOAD Here is my game fleet status. I see that there are 4 active instances. But when client send request to create new game session, sometime i got this exception: REMOVEDUPLOAD
What's the reason? I don't see anything wrong with my fleet setting. Why no active and available server processes found on my fleet? How to fix that error? Please help me beacuse my project gonna to launch into production. Thank you very much!
I took a quick look at logs and metrics for your fleet "fleet-******
30 Nov 2021 08:36:44 Received health report from process: 2538, isHealthy: true 30 Nov 2021 08:37:44 Received health report from process: 2538, isHealthy: false 30 Nov 2021 08:38:44 Received health report from process: 2538, isHealthy: false 30 Nov 2021 08:39:44 Received health report from process: 2538, isHealthy: false 30 Nov 2021 08:39:53 Detected a process (pid: 2538) that has been unhealthy for more than 180 seconds. Terminating the process.
This can be fixed by determining why you are returning false in the
OnHealthCheck callback, and switching it to return true.
In the future, you can debug this on your end by:
- Looking at the AvailableGameSessions metric, and noticing how it is constantly fluctuating:
- Looking at fleetEvents for your fleet and looking for "SERVER_PROCESS_TERMINATED_UNHEALTHY" fleet events: https://docs.aws.amazon.com/gamelift/latest/apireference/API_Event.html#API_Event_Contents
Getting FleetCapacityExceededException means that there are no game server processes running on your fleet that are available to host your gameSession. If you have enough capacity/hosts under your fleet then there is likely some issue with your server processes causing GameLift to think they are unhealthy and not available for a GameSession.
Steps to debugging further:
- Check the "AvailableGameSessions" metric for your fleet in cloudwatch or the GameLift Console to determine if your serverProcesses are healthy. - https://docs.aws.amazon.com/gamelift/latest/developerguide/monitoring-cloudwatch.html
- Check the Fleet Events in the GameLift Console for any abnormal server process terminations. - https://docs.aws.amazon.com/gamelift/latest/apireference/API_Event.html
- SSH (or RDP) onto the GameLift instance and try to start up your serverProcess to see if it works - https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-remote-access.html
- Validate you're integrating correctly with the GameLift Server SDK https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-server-sdk-csharp-ref.html
Maybe something misunderstand. Let me explain my game flow: A client create a room, and wait for others to join to play together. when client request to create a room by CreateGameSessionAsync method, gamelfit will start 1 game server instance (server build I uploaded ), and if successful, it will return to my client ip address and port of server instance, and client connect to that ip/port to join this room and play. If a game session successful created, it appear on "AvailableGameSessions" metric. But this exception occur sometimes when client call CreateGameSessionAsync method, mean that can't create a game session, or gamelift can't start my game server instance, is that right? I think It's not related to "AvailableGameSessions" in gamelift console. In detail of the error, it said: REMOVEDUPLOAD So I guess it's something wrong with gamelift fleet? I think i have intergrated correctly with Gamelift Server SDK, because this exception not occur all the time. Sometimes, i can create game session and join to play normally.
That's it, I know what's the reason. I was implemented that if no client connect to server after 30 seconds, set healthy to false, so it'll auto shutdown if no client connects after long time. But it was wrong, I should check it after game session start, because when server is idle, ofcourse no client connect, and if i set healthy to false, it can't create game session after that :D Do you have any advice what should I implement in OnHealthCheck? or just simply return true ? Thank you very much!
OnHealthCheck should return true if you want to be able to create a GameSession on that serverProcess. Returning False will make it so that GameLift does not consider the serverProcess as available.
If there are any conditions during which you wouldn't want a gameSession to be placed on a serverProcess (for example: maybe something went wrong with the serverProcess Initialization), then you should return false, but otherwise returning true is correct (so that the process can be used).
Thank you very much for you help!
Is there an event for game session termination?Accepted Answerasked 4 months ago
FleetCapacityExceededException - Unable to reserve a process on fleetasked 2 years ago
Running a "proxy" process on gameliftAccepted Answerasked a year ago
Unable to reserver a process on fleet ( FleetCapacityExceededException)Accepted Answerasked 7 months ago
Fleet IQ - Workingasked a year ago
Fleet Initialization Failed: Cannot run program /local/game/install.shasked 5 years ago
Simultaneous client requests to create game sessionsAccepted Answerasked a year ago
Failed to creat a fleet of GameLiftasked 3 months ago
Realtime Server Fleet Etag errorsAccepted Answerasked 2 years ago
Server process started correctly but did not call InitSDK() or ProcessReady() within 5 minutes.asked 16 days ago