0XC0020018

RPC Server Too Busy 0XC0020018 – Fix for High-Load Scenarios

Server & Cloud Intermediate 👁 0 views 📅 May 25, 2026

Happens when Windows RPC hits its thread pool limit under heavy load. You'll see this on busy servers or domain controllers. The fix is adjusting RPC thread limits.

When this error hits

You're running a Windows Server — say 2019 or 2022 — and you see RPC_NT_SERVER_TOO_BUSY (0XC0020018) in application logs or during remote management. Maybe you're trying to run dcdiag across domain controllers, or Exchange is talking to a global catalog server. The operation fails with "The RPC server is too busy to complete this operation." This isn't a network timeout — it's a throttling signal from inside RPC itself.

What's actually happening

Windows RPC uses a thread pool to handle incoming requests. Each RPC endpoint — like the one used by Active Directory replication or WMI — has a quota for concurrent threads. By default, each endpoint is limited to 25 threads. When you exceed that, RPC returns 0XC0020018 instead of queuing the call. The reason is historical: on older hardware, allowing unlimited threads would swamp the CPU. But on modern multi-core servers, 25 threads is laughably low. You hit this when you have multiple apps hammering RPC at the same time — think a backup tool, a monitoring agent, and PowerShell remoting all at once.

The error code itself is defined in winerror.h as RPC_S_SERVER_TOO_BUSY. The RPC runtime doesn't retry automatically — the calling app gets a hard failure. So the app either retries with backoff or crashes. Neither is great for production.

The fix: raise the thread limit

Microsoft provides registry keys to increase the number of concurrent RPC threads per endpoint. You need to edit ThreadPoolMaxThreads under the RPC parameters key. This is a server-wide setting, not per-interface. It directly controls how many threads the RPC runtime will create before returning too busy.

Step-by-step

  1. Open regedit as Administrator.
  2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Rpc\Server.
  3. If the Server key doesn't exist, create it (right-click Rpc → New → Key, name it Server).
  4. Inside Server, create a DWORD (32-bit) value named ThreadPoolMaxThreads.
  5. Set the value. Decimal 100 is a safe start. Decimal 200 for very busy servers. Each thread consumes about 1 MB of stack, so don't go above 500 unless you have RAM to spare.
  6. Exit regedit.
  7. Restart the RPC service. Open an admin command prompt and run:
net stop RpcSs && net start RpcSs

That restart will disconnect active RPC clients briefly — schedule it during maintenance if possible. After restart, the new limit is active.

Why this works

The default of 25 threads was set back in the NT era when 25 concurrent RPC calls could saturate a CPU. Modern servers with 16+ cores can easily handle 100 or more simultaneous RPC threads. The reason step 3 works is that ThreadPoolMaxThreads gets read once when RPC initializes, so a restart is mandatory. You don't need to touch MaxRpcWorkItems — that's a different pool used for internal tasks. The thread count is the one that actually gates incoming requests.

If it still fails

  • Check if the registry key took effect. Use reg query HKLM\SOFTWARE\Microsoft\Rpc\Server /v ThreadPoolMaxThreads to confirm the value. Some third-party security software resets this on reboot.
  • Look for port exhaustion. Run netstat -an | find ":135" to see if RPC endpoint mapper connections are piling up. If you see hundreds in TIME_WAIT, you might need MaxUserPort and TcpTimedWaitDelay tweaks instead.
  • Verify the RPC endpoint mapper itself isn't dying. The mapper runs on port 135. If that service stops, you get different errors (like RPC_S_SERVER_UNAVAILABLE), not 0XC0020018.
  • Check event logs for RPC runtime errors. Look in System log under source RPC for event ID 1 — it sometimes logs thread pool failures with more detail.

If you're still stuck after raising the thread limit, you likely have a misbehaving client that's opening too many RPC connections and never closing them. Wireshark trace on port 135 will show you the pattern. But for 90% of cases, bumping ThreadPoolMaxThreads to 100 or 200 kills the error dead.

Was this solution helpful?