You're seeing 0x000000A4, and it's frustrating
That blue screen with ERROR_MAX_THRDS_REACHED means your system literally ran out of room for new threads. Windows has a hard limit — default is 2048 threads per process in most builds, though the system-wide cap is far higher. When you hit it, everything freezes, then the screen goes blue. This isn't a random crash. It's a deliberate stop to prevent corruption.
The quick fix: raise the thread limit via registry
- Press Win + R, type
regedit, hit Enter. - Go to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Executive - If
Executivedoesn't exist, right-clickSession Manager, create a new Key and name itExecutive. - Inside
Executive, right-click in the right pane, choose New > DWORD (32-bit) Value. - Name it
MaximumProcessCount. - Set the value to
1000(that's decimal 4096 threads per process). The max you can set isffff(65535 in decimal), but I'd start at 4096 — going higher can mask the real problem. - Click OK, close regedit, and reboot.
Why this works: The kernel uses PspMaximumProcessCount to gate thread creation. By default, it's tuned for desktop use where 2048 threads per process is plenty. If your app (or driver) legitimately needs more — say, a heavily threaded server app or a custom data processor — this registry key overrides that per-process limit. The system cap is usually 1,500,000+ threads total, but each process is throttled individually. This fix removes the bottleneck at the process level.
If the registry key already exists or doesn't help
Then the issue isn't the per-process limit. It's likely one of three things:
1. A driver or system service is leaking threads
Run Process Explorer from Sysinternals (not Task Manager — it lies about thread counts in some versions). Sort by the Threads column. Look for anything with thousands of threads. Common culprits:
- Antivirus real-time scanning components (especially McAfee, Norton, or older Kaspersky builds)
- Disk defragmenter services running on large volumes
- Misconfigured IIS worker processes serving too many concurrent requests
- Custom .NET applications with thread-pool exhaustion from
Task.Factory.StartNewloops
Kill that process (right-click > Kill Process). If the BSOD stops, you've found the leak. Update or uninstall that software.
2. You're running under a job object with a lower limit
Some enterprise management tools (like AppLocker or certain RMM agents) attach job objects to processes, enforcing a lower thread cap than the system default. Check with:
powershell -Command "Get-CimInstance -ClassName Win32_Process | Select-Object Name, ProcessId, ThreadCount | Sort-Object ThreadCount -Descending | Select -First 10"
If you see a process with fewer than 2048 threads crashing earlier, a job object is likely. Check event logs under System for source Microsoft-Windows-Kernel-Process — it logs job object limits being hit.
3. The kernel heap is fragmented
Rare, but possible on systems that have been running for months without a reboot. A memory dump from the BSOD will show PspCatchCriticalThread failing with STATUS_TOO_MANY_THREADS even though the thread count is low. Reboot fixes it temporarily. Permanent fix: install all pending Windows updates — Microsoft patched heap fragmentation issues in KB5028168 for Windows 10 22H2 and KB5030212 for Windows 11 22H2.
Prevention: stop it from happening again
- Keep Windows updated. Post-2022 patches hardened the thread pool manager against fragmentation.
- Monitor thread counts. Set up a perfmon alert on
Process\Thread Countfor all processes. If any single process exceeds 1500 threads, investigate. - If you own the leaking app: switch to a bounded thread pool (like
ThreadPool.SetMinThreadsin C#, ornewFixedThreadPoolin Java) instead of unbounded thread creation. - For production servers: set the registry key preemptively to 4096 — it costs nothing and buys you time against future leaks.
- Reboot quarterly. Not a joke. Even Linux kernel devs recommend it for long-running systems. Thread metadata accumulates in non-paged pool until you reboot.
One last thing: Don't confuse
0x000000A4with0x000000A0or0x0000009F. Those are power-state or driver power failure codes. Different beast entirely. If the stop code literally saysERROR_MAX_THRDS_REACHEDalongside0x000000A4, you're in the right place.