NoMachine Support

Your questions answered

Knowledge Base

Searching in: Articles & FAQs
Filter the search results
Applies to:
Last update:
Searching in: Articles & FAQs
ID: AR08M00858
Applies to: NX Server Products
Added on: 2015-08-31
Last update: 2019-01-03
Limits on concurrent virtual desktops and concurrent connections explained

Limits on the number of virtual desktops and/or connections can be set in two ways: (i) in the server configuration or if the server supports profiles, (ii) via profile rules. It's advisable to not mix the two ways.

The value specified as limit cannot be higher than the maximum number of connections or virtual desktops allowed in the license file (server.lic and/or node.lic) in the 'Connections' and 'Virtual Desktops' field respectively.

The connections limit counter counts all types of connections (connections to physical desktop, virtual desktops, custom sessions, sessions which have been reconnected, sessions connected to other user's virtual desktop).

The virtual desktops limit counter counts only new virtual desktops.

When the user connects, the connections limit counter is always increased, while the virtual desktops limit counter is increased only when the user creates a new virtual desktop or a new custom session.

The connections-limit counter is decreased when the user disconnects.

The virtual desktops limit counter is decreased only when the user terminates the virtual desktop or custom session.

 

LIMITS SET IN THE SERVER CONFIGURATION FILE
 

1. Limits on concurrent virtual desktops on the NoMachine server host

1.1 The number of concurrent virtual desktops allowed on the remote machine is ruled by the VirtualDesktopsLimit server configuration key:

VirtualDesktopsLimit 20

When this limit is exceeded, the server issues the following message whenever trying to connect:

Reached the maximum number of concurrent virtual sessions on this server

This occurs also when the server license allows for unlimited virtual desktops (field 'Virtual Desktops:  Unlimited' in the server.lic file).

In this case uncomment and increase the value set for the VirtualDesktopsLimit key in the server.cfg configuration file (/usr/NX/etc/server.cfg) . Restarting NoMachine is not required.

 

1.2 Number of cuncurrent virtual desktops a single user can run is ruled by the VirtualDesktopsUserLimit key in the server configuration file:

VirtualDesktopsUserLimit 20

When this limit is exceeded logs report:

Virtual Session capacity: reached for user: <username>

Uncomment and increase the value set for the VirtualDesktopsUserLimit key in the server configuration file to each user run more concurrent virtual desktops. Restarting NoMachine is not required.

 

2. Limits on concurrent connections to the NoMachine server host

2.1 Concurrent connections (either to physical desktop and virtual desktops) are ruled by the ConnectionsLimit key in the server configuration file:

ConnectionsLimit 20

When this limit is exceeded, the server makes room automatically for a new connection according to the settings of the AutomaticDisconnection key in the server configuration.

By default the server requests authorization to the user already connected (User A) to terminate its connection and let the new user (User B) have its own. If user a doesn't reply on time (timeout is 20 seconds) the server terminates connection of User A and let User B connect.

If the connected user is the same of the incoming user, the request is skipped and the first connection is terminated to let the new one start.

 

For NoMachine server versions 4 not providing the AutomaticDisconnection key, the server issues the following message and new connections are not allowed until any of the previous ones is terminated:

Reached the maximum number of concurrent sessions on this server

Since the default value set for ConnectionsLimit is 20, the limit may be reached alsowhen the server license allows for unlimited concurrent connections to the physical desktop ('Connections:  Unlimited' in the server.lic file ).

In this case uncomment and increase the value set for the ConnectionsLimit key to allow for more connections. Restarting NoMachine is not required.
 

2.2  Number of concurrent connections to the remote server host a single user can run is ruled by the ConnectionsUserLimit key in the server configuration file:

ConnectionsUserLimit 20

When this limit is exceeded logs report:

Server capacity: reached for user: <username>

Uncomment and increase the value set for the ConnectionsUserLimit key in the server configuration file to allow each user to run more concurrent connections. Restarting NoMachine is not required.

 

 

Note for multi-node environment

These keys (ConnectionsLimit, ConnectionsUserLimit, VirtualDesktopsLimit and VirtualDesktopsUserLimit) are set by default to '20' in the server.cfg of the main server and of each of the remote nodes in the multi-node environment.

Custom values can be set on the server and will apply to the whole multi-node system or can be set on a specific node and will apply to this node only. Custom limits can be set also on the main server and on each of the remote nodes.

The general rule is that more restrictive settings override the others.

For example:

1) The multi-node environment is made of one server and three nodes

If 'ConnectionsLimit 100' is set in server.cfg on the main server and 'ConnectionsLimit 50' is set in server.cfg of three nodes, the maximum number of global connections distributed among the three nodes is still 100 (and not 150  as allowed by the sum of each node setting).

2) The multi-node environment is made of one server and one node

If 'ConnectionsLimit 100' is set in server.cfg on the main server and 'ConnectionsLimit 50' is set in server.cfg of the remote node, the maximum number of connections on the node is 50 (and not 100). If another node is added to the system with 'ConnectionsLimit 50' set in its server.cfg, the maximum number of global connections distributed among the two nodes is 100 (as per-settings of the main server), but each node will allow maximum 50 connections.

 


 

LIMITS SET VIA PROFILE RULES (for servers supporting profiles)

Limits set on per-user basis
With the implementation of the following FR it will be possible to specify limits on per-user and per groups basis:

https://www.nomachine.com/FR07L02818

 

Limits for multi-node environments
Please note that in v. 6 the multi-node environment is available only with the Enterprise Terminal Server plus the Terminal Server Nodes. 

i) nxserver --nodeadd NODE --limit LIMIT

The --limit option sets the maximum number of concurrent connections (defined by the LIMIT value) allowed on that node. This value is also used by the NoMachine custom script for weighted round-robin.

 

ii) nxserver --ruleadd --class node --type limit --value LIMIT

nxserver --ruleadd --class node --type TYPE --value yes|no OPTION

The limit type of rule sets the maximum number of concurrent connections (defined by the LIMIT value) allowed on the system.

 

iii) nxserver --ruleadd --class node --type virtual-desktops-limit --value LIMIT --node NODE

to control the maximum number of concurrent virtual desktops (defined by the LIMIT value) allowed on the given node.

 

iv) nxserver --ruleadd --class node --type connections-limit --value LIMIT --node NODE

to control the maximum number of concurrent connections (defined by the LIMIT value) allowed on the given node.

The more restrictive limit always applies and overrides the others.
 

Other references

1) Server administrator's guides for NoMachine v. 6:
https://www.nomachine.com/all-documents

2) NoMachine entries for virtual desktops in the server session list explained (v. 6)
https://www.nomachine.com/DT10O00153

3) How to terminate NoMachine virtual desktops sessions automatically

https://www.nomachine.com/AR08M00854