Pages

Thursday, December 1, 2011

The terminal server has exceeded the maximum number of allowed connections

Resolving the error: "The terminal server has exceeded the maximum number of allowed connections"

When a user establishes a Remote Desktop connection to the server this connection will remain active until the user selects "Log Off" from the Start Menu. As such, if a user simply closes the remote desktop window when they're finished with the server, that username will remain logged on.
The software running on the server to facilitate the Remote Desktop connection will allow for up to two simultaneous administrative sessions.
If a third attempt is made to login to the server, the error discussed here will be shown to the user, and they will be unable to complete the login process.
To get around this error and log into the server, you can log into a special session call the Console Session in order to Log Out the other connections.
To do this, simply type the following in a Start -> Run or Command Prompt.

mstsc /v:00.00.00.00 /admin
Replace 00.00.00.00 with your server's IP Address.
Alternatively you may also modify the Remote Desktop Shortcut by going to:
For Windows Vista/7: Click Start, type remote desktop. Right Click the shortcut, click properties.
In the target field paste the following command: %systemroot%\system32\mstsc.exe /admin
For Windows XP: Click Start, go to All Program > Accessories > Communications > Right click Remote Desktop Connection and click properties.
In the target field paste the following command: %systemroot%\system32\mstsc.exe /admin
Click OK to save the change.
Now type in the IP of your server and you should be able to login via the Console.

Once logged into the server, right click on your task bar and select 'Task Manager'from the list. When the 'Task Manager' comes up, select the 'Users' tab. In this window, you will see all of the users currently connected to the server. Select a disconnected user, and then click the 'Log off' button at the bottom to clear it.   
   
Once this has been completed, log the session you are using off and you should be able to connect as normal.
Please use this session only to properly terminate the other two active sessions.