Matchmaking Stops Suddenly When Too Many Players Try To Find a Match

im using nakama version 3.27.1
i have authoritative matches and im using go lang for custom runtime

when my game reaches an amount of load of players trying to find matches nakama matchmaker suddenly stops finding matches, sometimes i see client logs from here:
var matchmakerTicket = await socket.AddMatchmakerAsync(query, minPlayers, maxPlayers, matchmakingProperties);
that says process failed or failed to give matchmakign ticket
but in general i havent been able to identify the problem and where it exactly comes from

at first the problem appead when my gamed reached about 8500 sessions and 1400 active matches, i do not knwo how many players where trying to find new matches

but when i changes the interval_sec from 10 to 1 second my limit went to 10k sessions and 1800 matches

how do i knwo it is too many people trying to find a match?
i have a macthmaking_not_avaiable flag for my game and when i turn it on players can be inside the game and chat and other activities but they cant use matchmaking and play and when a reach the limit i turn it on and after 2 minutes when player arent trying to find any matches i turn if off and eveything works ok again and nakama gives tickets and finds matches untill again i reach the limit

the only configuration that seemd to help was interval_sec

also my matches are mainly min=4 max=4 but some matches are min=2 and max=2
other than that i have an arena system abd that can have 3 different values for 3 different arenas
also i have a match version to handle older clients when updating

this is all of my matchmaking query

i have no issues on CPU load or RAM Usage or anything

Hi @spartan6nm,

Are you running Nakama on a custom deployment or on Heroic Cloud?

I’m running on a custom deployment, and based on my monitoring, I do not have limited resource issues like high CPU load or RAM

Also, I did get better results by setting matchmaker.rev_precision to false After I posted here

But what if my games needs matchmaker.rev_precision to be true ?

There’s only so much help we can give with custom deployments; matchmaking is a best effort and resource intensive process. Can you clarify what error exactly are you seeing?

It’s possible that if you’re running Nakama on a single machine with that many matches and sessions, the frequent goroutine context switching could be causing service degradation even if you’re not seeing maxed up resource utilization.

The suggestions I can give is to either scale vertically and see if that helps, move to Heroic Cloud and scale horizontally, or try to split matchmaking to a dedicated instance and have the clients connect to both instances, one for matchmaking and the other for everything else.