Problem description
When connecting to a Windows Elastic Compute Service (ECS) instance using Remote Desktop, you receive the error message: "The terminal server has exceeded the maximum number of allowed connections".
Cause
By default, Windows Server Standard Edition allows a maximum of two concurrent Remote Desktop sessions. When this limit is reached, new connection requests are rejected.
Solutions
There are two ways to solve this, depending on whether you need a temporary workaround to regain access or a permanent solution for supporting more than two concurrent users.
Solution 1 (Recommended): Sign out a session by logging on to the instance
Log on to an ECS instance using a VNC connection.
Go to ECS console - Instance. In the top navigation bar, select the target region and resource group.
Go to the details page of the target instance. Click Connect and select VNC. Enter the username and password to log on to the ECS instance.
Open Task Manager.
Right-click the
icon, select Run, enter taskmgr, and press Enter.Sign out the remote user.
In the Task Manager window, click More details if needed, then go to the Users tab. Select the user you want to disconnect and click Sign out (or log off).
ImportantSigning out a user will terminate their session and any running applications. Proceed only if you are sure this will not disrupt critical operations.
Verify the fix.
Try to connect to your ECS instance using Remote Desktop again. Your connection should now be successful.
If the issue persists, you can restart the instance. This is a last resort that will terminate all remote sessions but will also cause a service interruption.
Solution 2: Configure multi-user remote logon for Windows
If you consistently need more than two users connected at the same time, the permanent solution is to install the Remote Desktop Services (RDS) role and then configure multi-user remote logon.
Installing RDS requires a server restart, which will cause a service interruption. Plan for this downtime before you proceed.