0XC000002F

STATUS_PORT_MESSAGE_TOO_LONG 0xC000002F Fix

Windows Errors Intermediate 👁 1 views 📅 May 28, 2026

The 0xC000002F error means a Windows port message was too big. This guide gives you two quick fixes and explains what caused it.

Yeah, this one's annoying. You're working and suddenly an app crashes—or worse, your whole system throws a blue screen with STATUS_PORT_MESSAGE_TOO_LONG (0xC000002F). The error code alone feels cryptic, but it's actually pretty specific. Let's fix it.

What exactly triggers this error?

This error shows up when Windows tries to send a message over an LPC (Local Procedure Call) port—used for communication between processes—and the message is larger than the port's buffer can handle. Think of it like stuffing a king-size blanket into a carry-on bag. The system refuses, and you get 0xC000002F.

Real-world trigger? I've seen it most often when LSASS (Local Security Authority Subsystem Service) gets overloaded—say, during a domain join or when an antivirus tool hooks into authentication too aggressively. Or when a custom application with misconfigured port settings sends oversized data to a Windows service.

Fix #1: Clear the LSASS cache (fastest try)

This works maybe 40% of the time. LSASS builds up cached authentication data, and a bad cache entry can cause oversized messages.

  1. Press Win + R, type services.msc, and hit Enter.
  2. Scroll down to Credential Manager. Right-click it and choose Stop.
  3. Now open File Explorer. In the address bar, paste this path: C:\Windows\System32\config\systemprofile\AppData\Local\Microsoft\Credentials
  4. Delete everything in that folder. Don't worry—it's temporary cached data.
  5. Go back to Services, right-click Credential Manager again, and click Start.
  6. Restart your PC. After reboot, the error should be gone on most systems.

After restarting, run the app or process that used to crash. If it works, you're done. If not, move to Fix #2.

Fix #2: Registry tweak to increase the port message size

This fix changes how Windows handles LPC port messages. It's more permanent and works for custom applications or server software that legitimately needs to send bigger messages.

Warning: Editing the registry can break things if you're not careful. Back it up first. Go to File > Export in Regedit and save a copy.

  1. Press Win + R, type regedit, and hit Enter. Click Yes if UAC asks.
  2. Navigate to:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
  3. Right-click in the right pane, choose New > DWORD (32-bit) Value. Name it MaxLpcMessageSize.
  4. Double-click MaxLpcMessageSize. Set the base to Decimal, then enter a value. Start with 65536 (64 KB). The default is 4096 bytes, so this gives you 16x more room.
  5. Click OK, then close Regedit.
  6. Restart your PC. The change takes effect only after a reboot.

Why do these fixes work?

The first fix clears junk that inflated messages beyond the port's capacity. LSASS had too much cached data, and cleaning it let normal-sized messages flow again.

The second fix is more direct. Windows defaults to a 4 KB message buffer for LPC ports. Some apps—especially custom database connectors, remote management tools, or older ERP software—try to send larger payloads. Bumping the limit to 64 KB means you're telling Windows: “It's okay, let the big stuff through.”

Under the hood, the LPC port is managed by the kernel. When a message exceeds MaxLpcMessageSize, the port returns STATUS_PORT_MESSAGE_TOO_LONG. Your registry change raises that ceiling.

Less common variations of this error

You might see 0xC000002F as a Windows Event ID 7031 or 7034 in Event Viewer (Application log). This means a service like LSASS restarted because of the error. Another variation: the error pops up when running wmic commands remotely, where the query result is too large for the default port buffer.

In Windows Server 2016/2019/2022, this error sometimes appears during Active Directory replication if Group Policy objects have massive permissions lists. The fix is to check event IDs 1925 or 1926 and increase the LDAP query size—but that's a separate guide. For the 0xC000002F specifically, the registry fix above handles it.

Prevention tips going forward

  • Don't install junk antivirus. Some third-party AV tools hook into LSASS and bloat LPC messages. Stick with Windows Defender or a known light AV like Bitdefender.
  • Monitor Event Viewer under Windows Logs > System and Windows Logs > Application. Look for repeated 0xC000002F entries—that means it's not a one-off fluke.
  • Update your drivers. Outdated network or storage drivers can also trigger LPC issues. Run Windows Update manually and check the manufacturer's site for chipset drivers.
  • If you develop software that uses LPC ports, keep messages under 4 KB. If you can't, deploy the registry fix as part of your installer.
  • Check your RAM. Bad memory can cause random 0xC000002F errors. Run mdsched.exe (Windows Memory Diagnostic) and let it scan overnight.

That's it. You should be back to work now. If the error still shows up, test the registry fix on a different machine first—sometimes a third-party app has its own port size limit that overrides Windows' setting. In that case, contact the app vendor.

Was this solution helpful?