All Products
Search
Document Center

:What do I do if the error message "The terminal server has exceeded the maximum number of allowed connections" appears when I connect to a Windows instance by using Remote Desktop?

Last Updated:Mar 17, 2023

This topic describes how to resolve the issue that the following error message appears when you connect to a Windows Elastic Compute Service (ECS) instance by using Remote Desktop: The terminal server has exceeded the maximum number of allowed connections.

Problem description

When you use Remote Desktop to connect to a Windows instance, the error message The terminal server has exceeded the maximum number of allowed connections appears.

Cause

This issue may occur because the current default Windows system is the standard version. This version supports only two free remote desktop terminals to connect to the instance at the same time.

Solutions

Use one of the following solutions to resolve the issue based on the actual scenario:

(Recommended) Solution 1: Log on to the Remote Desktop Connection Console, log off the user, and use another user to log on the instance.

  1. On your computer, right-click the Start icon and select Run. Enter mstsc /admin to log on to the Remote Desktop Connection Console.

    Note

    The mstsc /admin command is applicable to Windows 7 and later.

  2. Connect to the Windows instance by using Virtual Network Computing (VNC).

    For more information, see Connect to a Windows instance by using a password.

  3. Right-click the Start icon and select Run. Enter taskmgr to go to the Task Manager window.

  4. On the Users tab, select the connected user, click Logoff. Then, use another user to log on to the instance by using Remote Desktop.

Solution 2: Restart the instance

Restart the Windows instance to resolve the issue that the error message The terminal server has exceeded the maximum number of allowed connections appears. For more information, see Restart an instance.

Warning

The restart operation stops the instance for a short period of time and interrupts services that are running on the instance. Proceed with caution. We recommend that you create snapshots for the disks of the instance to back up data before you restart the instance. For more information, see Create a snapshot of a disk.