Why This Error Happens
Error 151 is a legacy Win32 API error code (ERROR_TOO_MANY_MUXWAITERS) originally tied to the OS/2 subsystem’s DosMuxSemWait function, which Windows retained for backward compatibility. It typically surfaces when a poorly coded legacy application, driver, or script requests a multiplexed semaphore wait with an invalid or excessive number of semaphore handles (the API only supports a limited count, historically capped at 16). On Windows 11, this is most often triggered by outdated third-party software, a corrupted legacy DLL, or a faulty driver still calling deprecated 16-bit/OS/2-compatibility APIs.
Step-by-Step Resolution Guide
-
Identify the offending application
Open Event Viewer (eventvwr.msc) → Windows Logs > Application, filter for Event ID 151, and note the source application or service that logged the error. This is almost always a legacy program, not a core Windows process. -
Update or reinstall the legacy application
Check the vendor’s website for a Windows 11–compatible update. If none exists, reinstall the application and run it in Compatibility Mode:
- Right-click the .exe → Properties → Compatibility tab
- Check Run this program in compatibility mode for, select Windows 8 or Windows 7
- Run System File Checker and DISM
Corrupted system files can affect legacy API shims. Open Command Prompt (Admin) and run:
sfc /scannow
DISM /Online /Cleanup-Image /RestoreHealth
Restart after completion.
-
Disable/Update the conflicting driver
If the error correlates with a specific driver (check Device Manager for warning icons), update it via Device Manager > right-click device > Update driver, or roll back/uninstall it if recently installed. -
Check for NTVDM/legacy subsystem components
Ensure the Windows Subsystem for legacy applications isn’t corrupted:
- Go to Control Panel > Programs > Turn Windows features on or off
- If listed, toggle Legacy Components off, restart, then re-enable it.
Alternative or Verification Steps
- After applying fixes, reproduce the original action that triggered Error 151 and confirm Event Viewer no longer logs a new instance of Event ID 151.
- If the error persists, use Process Monitor (Procmon) from Sysinternals to trace which process calls
DosMuxSemWaitand isolate it for removal or replacement with a modern equivalent.