ERROR_CTX_NO_OUTBUF (0X00001B60) – No Free Output Buffers
Windows Remote Desktop sessions run out of internal output buffers. Usually a shortcut or policy hogs memory. Kill hung sessions or increase buffer pool.
Cause 1: Stuck or orphaned RDP sessions consuming all output buffers
What's actually happening here is that each Remote Desktop session gets a pool of output buffers — internal memory structures the Terminal Services driver uses to send screen updates back to the client. When a session disconnects uncleanly (user closes laptop lid without logging off, network drop, or a hung rdpclip.exe), Windows doesn't always reclaim those buffers. Over time, the buffer pool fills up, and new connections hit ERROR_CTX_NO_OUTBUF.
I've seen this most often on Windows Server 2019 and 2022 running as RDS hosts with 20+ users. A single user who leaves a Photoshop session or a web browser with heavy animations can pin down dozens of buffers. The fix is to forcibly log off those ghost sessions.
How to check and clear stuck sessions
- Open Remote Desktop Services Manager (
tsadmin.msc) on the server. Look for sessions in Disconnected state, especially ones with long idle times. - Right-click any disconnected session you don't recognize and choose Log Off. Confirm the prompt.
- If
tsadmin.mscisn't installed (common on non-RDS SKUs), use the command line instead:
query session /server:localhost
This lists all sessions with their IDs. Note the ID of any disconnected session (you'll see Disc in the state column). Then log it off:
logoff [sessionID] /server:localhost
For example, logoff 3 /server:localhost kicks session ID 3. After clearing all stuck sessions, try connecting again. Nine times out of ten, this resolves the error immediately.
The reason this works is that logoff forces Windows to release the output buffer handles held by that session. The buffer pool refills, and new connections allocate fresh buffers without hitting the limit.
Cause 2: Default buffer pool too small for your workload
If you've cleared stuck sessions and the error comes back within hours, the default buffer pool size is your real bottleneck. The Terminal Services driver allocates a fixed number of output buffers per session, and the server-wide pool has a hard cap. On Windows Server 2008 R2 through 2022, the default pool allows roughly 2000 buffers. That sounds like a lot until you have 50 users each grabbing 40-50 buffers for their desktop composition.
You can increase this pool via Group Policy or a registry tweak. The registry approach is faster and doesn't require a domain.
Increase buffer pool size via registry
- Open Registry Editor (
regedit.exe) as Administrator. - Navigate to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
- Create a new DWORD (32-bit) value named
MaxOutBufs. If it already exists, just modify it. - Set the value to 4096 (decimal). That's double the default. I've gone as high as 8192 on servers with 100+ concurrent sessions, but 4096 is safe for most environments.
- Close Regedit and restart the Remote Desktop Services service (
net stop TermService && net start TermService) for the change to take effect.
A quick check: after restarting, run qwinsta /server:localhost to verify sessions can establish without the error. This registry key directly tells the session manager how many output buffers to reserve. Without it, Windows uses a default that assumes light usage — which breaks under modern workloads like Teams screen sharing or remote CAD applications.
Cause 3: Misconfigured Group Policy limiting buffer pool
Some organizations push a Group Policy object (GPO) that restricts the number of simultaneous sessions or the per-session buffer allocation. The relevant policy lives under Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections. Look for "Limit number of connections" — if it's set to something like 1 or 2, you aren't just limiting sessions, you're also starving the buffer pool because Windows reduces the pool to match the connection cap.
I've debugged a case where a sysadmin set max connections to 4 on a 64GB server thinking it would improve performance. Instead, it triggered ERROR_CTX_NO_OUTBUF for every fifth or sixth connection attempt because the pool shrank to match. The fix: set this policy to Not configured or to a number that matches your actual license count (usually 999999 for unlimited).
Check and fix Group Policy
- Run
gpedit.msc(Local Group Policy Editor). - Navigate to: Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections.
- Double-click "Restrict Remote Desktop Services users to a single Remote Desktop Services session" — if enabled, disable it. This policy is notorious for fragmenting the buffer pool because Windows doesn't reuse buffers efficiently when it forces single-session mode.
- Also check "Limit number of connections". If it's enabled, set it to 999999 or disable the policy.
- Run
gpupdate /forcein an admin command prompt, then restart the Remote Desktop Services service.
The reason these policies cause the error: Windows allocates a static buffer array at service startup based on the configured max connections. If you cap connections at 4, the buffer array gets sized for 4 sessions — even if you only have 3 active users, the 4th slot might be reserved but unfilled, leaving no room for the actual buffer needs of those 3 sessions when they start using high-resolution displays or multiple monitors.
Quick-reference summary table
| Cause | Symptom | Fix |
|---|---|---|
| Stuck sessions | Error appears after a few disconnects | Log off disconnected sessions via logoff or tsadmin.msc |
| Small buffer pool | Error returns regularly after clearing sessions | Add MaxOutBufs DWORD (4096) under RDP-Tcp in registry |
| Group Policy caps | Error appears on every new connection attempt | Disable single-session restriction and connection limit in GPO |
If none of these resolve the error, check if third-party software (Citrix, VMware Horizon, or even screen recording tools) is injecting into the RDP stack. Those apps sometimes allocate their own buffer pools that collide with Windows' native ones. Uninstalling the third-party add-on temporarily can isolate the conflict. But in my decade of chasing this error, sticky sessions and the registry tweak cover about 90% of real-world cases.
Was this solution helpful?