TutorialNov 22, 20268 min read

Remote Desktop Disconnects Right After Login? 7 Fixes

Your RDP session connects, then drops seconds later or before the desktop loads. The usual causes are a second login taking over the session, a VPN or network that breaks RDP's UDP channel, or a busy server. How to find the reason code and fix it.

Short answer: when Remote Desktop connects and then drops within seconds, the cause is usually one of three things: another login with the same account took over the session, your VPN or network breaks RDP's UDP channel, or the server is restarting or out of memory. Check that only one device uses the Administrator login, turn off UDP in your client and test without the VPN, then read the disconnect reason code on the server to confirm.

This guide is for sessions that start and then end. If Remote Desktop can't reach the server at all (error 0x204, "can't connect to the remote computer"), start with Remote Desktop Can't Connect? 10 Fixes. If the session stays up but feels slow, see Remote Desktop Slow or Laggy? 9 Fixes.

01What Does Your Disconnect Look Like?

What happensMost likely causeFix
Desktop opens, then closes after a few seconds, again and againAnother device signs in with the same account1
Drops only while your VPN is on, or on one Wi-FiVPN or network breaks UDP2
Disconnects before the desktop loads, right after a restart or reinstallWindows is still starting or installing3
Drops while a heavy program runs, the session felt frozen firstServer out of memory4
Drops with a big screen or several monitorsDisplay settings5
Drops after some minutes without typingIdle timeout on the server or your router6
None of these fitRead the reason code7

021. Is Someone Else Signing In with the Same Account?

A second login with the same username takes over the session. The first device is thrown out within seconds.

Windows gives each user one session. When the same account connects from somewhere else, Windows moves the session to the new connection and disconnects the old one. On our servers, Remote Desktop allows one session per account by default. Two people who need to work at the same time should each have their own account: Two Users on One Windows RDP.

Typical sources of a second login:

  • Your phone or a second PC with the server saved in Windows App or Remote Desktop Connection, reconnecting by itself.
  • A colleague or a tool you gave the login to.
  • Someone who should not have it. If you can't explain the second login, change the password inside Windows right away (how) and limit Remote Desktop to your own IP on the firewall card of the server page (how).

Close Remote Desktop on every other device, then connect from one device only. If it stays up, this was the cause.

032. Does It Only Drop on Your VPN or One Network?

Remote Desktop opens a TCP connection first and then adds a UDP channel for speed. Some VPNs, especially protocols built to get through filters such as VLESS or AmneziaWG, and some routers and mobile networks pass TCP but break or throttle UDP. The session starts over TCP, switches to UDP, and drops.

  1. 1Test without the VPN. Disconnect it and connect to the server. If that works, the server is fine and the VPN is the cause. Let the server's IP bypass the VPN with split tunneling, or pick another VPN location (help answer).
  2. 2Test on another network. Your phone's hotspot is the quickest check. Hotel, office and school networks often interfere with RDP.
  3. 3Turn off UDP in the client if you have to stay on that network. On your own Windows PC, open Command Prompt as administrator and run the command below, then close and reopen Remote Desktop Connection.
bat
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\Client" /v fClientDisableUDP /t REG_DWORD /d 1 /f

The client then uses TCP only. That's a little slower on long distances but stable through filters. To undo it, run the same command with /d 0.

043. Is the Server Restarting or Still Installing?

A new Windows server needs 10 to 20 minutes after the payment confirms, and the same again after a reinstall. During that time Windows restarts several times, and a session that gets in early is cut off by the next restart. After Windows updates, give it up to 15 minutes.

Check the server page in the dashboard: it should say ready and running. If you aren't sure what state Windows is in, restart from the dashboard (not from inside Windows), wait two full minutes and connect once.

054. Is the Server Running Out of Memory?

When a server runs out of RAM, Windows can end the Remote Desktop session to protect itself. In the reason code this shows as 6. It happens with many browser tabs, several trading terminals or bots on a small plan.

  • Connect and open Task Manager (Ctrl+Shift+Esc). Memory above 90% is the warning sign.
  • Close or limit the program that grows. Browsers and headless browsers are the usual ones.
  • If the load is normal for you, take a plan with more RAM. Windows plans have 6, 8, 12 or 36 GB:

Top up $50 or more and get up to 15% extra on your balance.

Express2 vCPU · 6 GB · 40 GB NVMe$13.00/mobilled monthlyBuy
RecommendedVelocity4 vCPU · 8 GB · 60 GB NVMe$26.00/mobilled monthlyBuy
Eclipse8 vCPU · 12 GB · 80 GB NVMe$45.50/mobilled monthlyBuy
Titan10 vCPU · 12 GB · 140 GB NVMe$78.00/mobilled monthlyBuy
Colossus10 vCPU · 36 GB · 140 GB NVMe$104.00/mobilled monthlyBuy

Full RDP access · NVMe storage · DDoS protection · No setup fee

There is no in-place upgrade: order the larger server, move your setup and let the old one run out (step by step for Windows and Linux).

065. Does It Drop with a Large Screen or Several Monitors?

Very high resolutions and multi-monitor sessions need more from the client, the network and the server. If the session drops as soon as the desktop draws:

  • Turn off Use all my monitors in the Display tab of Remote Desktop Connection.
  • Pick a lower resolution, for example 1920 x 1080.
  • On a Mac, turn off Optimize for Retina displays for that PC in Windows App.

076. Does It Drop After Some Minutes Without Activity?

Two things end idle sessions:

  • Session time limits on the server. Open gpedit.msc on the server and look at Computer Configuration, Administrative Templates, Windows Components, Remote Desktop Services, Remote Desktop Session Host, Session Time Limits. Set the idle limit to Never, or leave it Not configured. The reason code for this is 3 (idle) or 4 (active time limit).
  • Your router or VPN closing quiet connections. In the same place, under Connections, enable Configure keep-alive connection interval and enter 1 minute. The server then sends regular keep-alive packets, which also helps the session reconnect to the same desktop instead of a new one. Microsoft describes this setting in its troubleshooting article.

Your programs keep running after a disconnect, as long as you close the window instead of signing out (details).

087. Read the Disconnect Reason on the Server

Windows writes a reason code for every disconnect. Reading it takes one command and ends the guessing.

Once you get a session that lasts long enough, open PowerShell on the server and run:

powershell
Get-WinEvent -LogName 'Microsoft-Windows-TerminalServices-LocalSessionManager/Operational' -MaxEvents 50 |
  Where-Object Id -eq 40 |
  Format-Table TimeCreated, Message -Wrap

Each line reads "Session N has been disconnected, reason code X". What the codes mean, from Microsoft's list of disconnect codes:

CodeMeaningGo to
0No reason recorded, usually the network dropped2
3The idle session limit elapsed6
4The active session limit elapsed6
5Another connection took over the session1
6The server ran out of memory4
11The session was disconnected by the user or an admin toolNormal when you close the window
12The user signed outNormal

Note the time of the drop and compare it with the list. If many events show code 5 at moments you weren't connecting, someone else has the login: change the password now.

09Still Dropping?

Restart the server from the dashboard and wait two minutes. If the session still ends right after login, open a ticket in the dashboard or message support on Telegram with the server name, the time of the last drop, the reason code if you got one, and whether you use a VPN. Don't send your password.

A reinstall gives you a clean Windows, but it erases everything on the server, so treat it as the last step (what you lose).

Most often because the same account signs in from another device and takes over the session, or because a VPN or network breaks RDP's UDP channel. A server that is restarting or out of memory is the third common cause.

  • remote desktop disconnects immediately
  • rdp keeps disconnecting
  • rdp disconnects after login
  • remote desktop disconnects after a few seconds
  • rdp session dropped
  • rdp disconnect reason code

Keep reading

All articles