UNet Client Disconnect Error: NoResources

I have created an online game. Today I am testing how it behaves with many players. Sadly, when 9th player tries to connect tothe server, I get an error on client: “UNet Client Disconnect Error: NoResources”

It is really confusing to me. My CPU/Memory usage is around 10%. Both server and clients were ran on the same PC. I thought there might be a limit for connections from one device, so I tried connecting from different one, but received the same error.

Does anyone know what is causing such behaviour and what can be done to fix this? I was hoping for a server to handle at least 50 players at a time.

Try to switch your channels. Seem like all on Reliable.

Did you ever solve this? I’m getting exactly the same thing. 9th player, no resources.

FWIW I could get past this blocker in the inspector of Network Manager → Advanced Configuration → Max Connections

3 Likes

The default configuration for servers and clients in UNET assumes a maximum of 8 connections/players (I learned this the hard way; the error message could certainly be clearer). You can change this number by explicitly calling the appropriate Configure method. For servers this would look like:

var config = new ConnectionConfig();
config.AddChannel(QosType.ReliableSequenced);
config.AddChannel(QosType.Unreliable);
NetworkServer.Configure(config, numConnections);

Where numConnections is your desired maximum number of connections/players.

Clients have an equivalent method in the NetworkClient class. Please note that if you do this you also need to manually specify a ConnectionConfig, which has to be the same for the server and the clients in order to prevent CRC mismatch errors at runtime.

1 Like

Hey im using your Master Server Kit and having this issue.
Im pretty sure the server is set up correctly but cant see where to set this on the client.
Any help would be great thanks.