Gamelift matchmaking was working... until it suddenly didnt


So i created a custom C# game server build (without unity engine) and uploaded it to gamelift. I created a fleet with that build and it seems to be working as it shows the fleet is in the ACTIVE state. I changed my queue to match with the fleet id and did a POST request to the flexmatch to start my matchmaking on my client device. Everything was working properly until one day it suddenly didnt… My matchmaking tickets arent getting recorded in dynamodb. no timed out or failed ticket status has shown in the table. It did however, showed a MatchmakingFailed status a couple days ago and on my fleet event mentioned a “Game session failed to activate within 5 minutes of ActivateGameSession()” description. That was where everything started to get messed up for me and i took a couple days off just to clear my head. Now im repeating the same process that should’ve either given me a MatchmakingSucceeded, MatchmakingTimedOut or MatchmakingFailed status but neither has happened and now im at a loss on what to do. I’ve done zero changes to my client and server code ever since the MatchmakingFailed incident.

Any thoughts on what is happening?

Can you provide a fleet-id or matchmaking config names and sample ticket ids and I can ask the GameLift service team to take a look?

FlexMatch will at the end try and create a game session so thats the point of failure to debug, as it seems like FlexMatch is trying and failing to get an active game session.

A few things to check:

  • Check your server instances are healthy (ie aren’t CPU / memory bound) by remoting into them (if you don’t have instance metrics). Processes running for a long time may have memory or thread leaks that leave the instances unresponsive.
  • Check your fleet events/metrics to see if GameLift thinks you have unhealthy instances.
  • Check your fleet metrics to ensure you have capacity. If you fail to terminate game sessions / processes cleanly you may have orphaned Game sessions that have filled your capacity.
    • Try placing game sessions manually in your queue and ensure they go active.

Hi @Pip,

Thanks for the quick response.

My fleet id is fleet-cdb2a295-db3c-4012-b91f-ee91f86a1e28, matchmaking config name is FitArcMatchmaker and sample ticket id is “ticketId”: “82b16169-e31b-4cf7-8348-7f6c64c59380”

Hi @MikeHAWL

I’m looking at the logs on the on-box agent and I don’t see a ActivateGameSession response from your process.

gameSessionId: arn:aws:gamelift:us-west-2::gamesession/fleet-cdb2a295-db3c-4012-b91f-ee91f86a1e28/c5d6f409-8455-4adc-ad08-5a1f02fa549a

instance: i-09e3f1e2b0f4f7c1d

Can you provide any logs around ActivateGameSession() calls from your server code?

Looking at the logs as well, i see a lot of process failures as well due to exit code (-1066598274): Unknown software. Are you missing any DLLs in the build?

Hi @Kenneth

I do not know where to find the logs of my server code, but It seems like the issue was that i was trying to create a separate secure websocket server right before calling the ActivateGameSession(). Once i commented that code out things started to work again. However, after i uncomment that code it started to work regardless…

So i don’t know what is going on with that… but i do need some sort of wss connection to my game server as it’s a requirement for my project. The way i’ve setup the websocket server is by using websocket-sharp.dll library and providing the url from the given DnsName and Port of the ACTIVE game session. From the fleet and according to the docs at this website, Ive managed to convert the fleet certificates into .pfx format that is required to do wss connection. In my game client, I once again try to connect via websocket and got an error response of “The request has timed out” after 60 seconds. Could there be some internal conflict between gamelift server and my websocket server that i have no control over?

Good morning Mike,

You may find the following docs useful for helping you locate your server log files:

Hello @MichaelM

I am aware of how to access my fleet instances remotely. The log path that i specified in my game server “C:\game\logs\someLog.log” does not generate any log files. In fact, there were no logs directory present when i rdp into the instance… I like to mention that i am NOT using the unity engine for my game server. Could that be why Im not seeing any logs?


Just want to clarify a few questions because I think there’s some confusion:

  1. Sounds like your logs are not present? If you are writing/using a custom implementation log management/output should be done through that to the game\log\ folder. It might be worth a look through the developer guide if you haven’t already. The pdf has some notes on initialization on page 49. Are you logging to this location and are you outputting to those logs before activating your game session?

  2. Regarding the socket issue if there was a conflict on the binding of the socket you should receive an error to that effect when initializing. Can you provide an example of the socket configuration/a sample instance, session, and time when the issue occured?