1024 session limit?

{1024 session limit ?}
Hi
I ran nakama locally (windows , binary) with custom config and default config but had same result in my case.
I have a function in Unity that generates 100 requests per second to create a new socket with Authenticate Device

this is my code:
public async void btnClick(int maxConnectionCreator) {
StartCoroutine(ss(maxConnectionCreator));
}

IEnumerator ss(int a) {
int b = a / 100;
for (int i = 0; i < b; i++) {
yield return new WaitForSeconds(1);
for (int j = 0; j < 100; j++) {
Client = new Nakama.Client(Scheme, Host, Port, ServerKey, UnityWebRequestAdapter.Instance);
string deviceId = System.Guid.NewGuid().ToString();
Session = await Client.AuthenticateDeviceAsync(deviceId);
Socket = Client.NewSocket();
Socket.ConnectAsync(Session, true);
Debug.Log(“another one !”);
}
}
}

And at the same time I check the number of sessions in the browser correctly (I do this to simulate the connection of several users and my goal was to achieve at least 50,000 sessions)
When it reaches the number of 1024 sessions, it starts closing all the previous sessions to reach 0 session , there is no problem until 1023 sessions !
I read the documents but found nothing.

Is this a limit on the number of connections for the free version?
Is there a way to remove this restriction?
thank you so much

My pc and software info :
cpu:corei7 7700 (4 core)
ram:16 gb
nakama {v 3.10} {windows binary}
cockroachDB {v21.2.4}

Sorry for my english And thx for made this beautiful awesome game server

No there is no limit on the number of connections to the server.

This looks like a misconfiguration on your local machine, likely to do with ulimits. You’ll need to change kernel settings to allow applications to open more socket connections. Unfortunately this is outside of something that I’m knowledgable about as this is heavily dependent on your setup.

1 Like