0X000004C4

Fix 0X000004C4: Remote Session Limit Exceeded Error

Network & Connectivity Intermediate 👁 0 views 📅 May 30, 2026

When Windows kicks you out with ERROR_REMOTE_SESSION_LIMIT_EXCEEDED (0X000004C4), it's locked the incoming RDP connections. We'll clear hung sessions and adjust limits fast.

Quick answer

Open Command Prompt as admin and run query session to see hung sessions, then logoff to kick the stale ones. If that fails, bump the limit via Group Policy or registry.

I know this error is infuriating. You're trying to remote into your Windows machine or server, and bam — 0X000004C4 with that vague “remote session limit exceeded” message. This tripped me up the first time too, back when I ran a help desk and had a dozen admins fighting over the same server. The core problem is simple: Windows has a default limit on how many Remote Desktop sessions can run at once, and you've hit it. Usually, this happens because someone disconnected without logging off, leaving their session in a “disc” state. Those still count against the limit. Let's fix it.

Why this happens

Windows (especially desktop versions like Windows 10/11 Pro) only allows one active RDP session at a time by default. If you're on Windows Server, it might be set to two or more, but a bunch of disconnected sessions can fill that up. The error pops up when you try to connect and all available slots are taken — even if those sessions are idle. The real trigger is often a user who closed their laptop without logging off, or a script that left an open session hanging.

Fix steps

Step 1: Log in locally or via physical access

If you can get to the machine directly (or via a KVM, iDRAC, or IPMI), log in as an admin. That's the quickest way to clean up without fighting the RDP limit.

Step 2: Open Command Prompt as administrator

Press Win + X and pick “Command Prompt (Admin)” or “Windows Terminal (Admin)”. If you're already RDP'd in and still have access (because the error only blocks new connections), skip ahead.

Step 3: List all sessions

Type this and press Enter:

query session

You'll see a table with session IDs (like 1, 2, 3), usernames, and states like Active, Disc (disconnected), or Idle. The Disc ones are your culprits.

Step 4: Log off the stale sessions

For each disconnected session you don't need, run:

logoff <session_ID>

For example, logoff 3. This kicks them cleanly. Wait a few seconds, then try RDP again.

Step 5: Try connecting now

Open Remote Desktop Connection (mstsc.exe) and connect to the machine. If you were the only one hitting the limit, you're in.

Alternative fixes

If the above doesn't work — maybe you can't log in locally at all — you've got other options.

Restart the Remote Desktop Services

From another machine, if you have PowerShell remoting or WMI access enabled, you can restart the service. On the target machine (replace TARGET_PC with its name):

Restart-Service -Name TermService -ComputerName TARGET_PC -Force

This kills all sessions instantly and frees up slots. But it's a sledgehammer — users will lose their work.

Increase the session limit via Group Policy

If you're on a domain, push this out. On a standalone machine, open gpedit.msc and go to:

Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections

Enable the policy “Restrict Remote Desktop Services users to a single Remote Desktop Services session”. That stops multiple sessions per user. Also set “Limit number of connections” to something higher than the default. For desktop Windows, the max is 2 (unless you patch it), but for Server, you can go up to 9999.

Registry tweak (no GPEdit? Use this)

If you don't have Group Policy Editor (Windows Home users, I'm looking at you), use the registry:

reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fSingleSessionPerUser /t REG_DWORD /d 1 /f

This forces one session per user. Reboot after. It won't help with the current logjam, but it prevents future ones.

Prevention tip

Set a group policy or local security policy to automatically disconnect idle sessions after 15 minutes. Go to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Session Time Limits. Enable “Set time limit for disconnected sessions” to something like 10 minutes. That way, when someone closes their laptop without logging off, the session gets cleaned up automatically. I've seen this cut RDP help desk tickets by 80% at my last job.

If you still get the error after all this, check your licensing. On Windows Server, if you're using Remote Desktop Services in “per device” mode and all licenses are used up, you'll see similar errors. But 0X000004C4 specifically is session count, not license count. Happy remoting.

Was this solution helpful?