Windows 11 Error 164: No More Threads Can Be Created in the System
Why This Error Happens
Error 164 occurs when the operating system exhausts the available thread pool, typically because system resources are constrained or a process/driver is leaking threads without releasing them. This is commonly caused by insufficient virtual memory, a runaway application spawning excessive threads, outdated or corrupted device drivers, or a system-wide resource limit (such as the kernel paged pool) being reached. In some cases, malware or a misbehaving background service can also rapidly consume thread handles until the system can no longer allocate new ones.
Step-by-Step Resolution Guide
- Identify the offending process using Resource Monitor:
- Press
Ctrl + Shift + Escto open Task Manager, then click More details > Performance tab > Open Resource Monitor. - In the Overview tab, sort processes by Threads count to identify any process consuming an abnormally high number of threads (often in the thousands).
- End the offending task via right-click > End Process Tree.
- Increase virtual memory (paging file) size:
- Go to Settings > System > About > Advanced system settings.
- Under the Advanced tab, click Settings in the Performance section.
- Go to the Advanced tab > Change under Virtual Memory.
- Uncheck Automatically manage paging file size for all drives, select your system drive (usually C:), choose Custom size, and set an initial size of
1.5xyour RAM and maximum size of3xyour RAM (in MB). - Click Set, then OK, and restart your PC.
- Update or roll back device drivers:
- Open Device Manager (
Win + X> Device Manager). - Check for drivers with warning icons, especially network adapters, storage controllers, and chipset drivers.
- Right-click each and select Update driver > Search automatically for drivers.
- If the issue started after a recent driver update, right-click the driver > Properties > Driver tab > Roll Back Driver.
- Run System File Checker and DISM to repair corrupted system files:
- Open Command Prompt as Administrator (
Win + X> Terminal (Admin)). - Run:
sfc /scannowand wait for it to complete. - Follow with:
DISM /Online /Cleanup-Image /RestoreHealth - Restart your computer once both commands finish.
- Check for malware or unauthorized background processes:
- Run a full scan using Windows Security (Settings > Privacy & security > Windows Security > Virus & threat protection > Scan options > Full scan).
- Remove any detected threats and restart the system.
Alternative or Verification Steps
- Verify the fix: Reopen Resource Monitor and monitor the Threads column over 10–15 minutes of normal use to confirm no process is climbing uncontrollably; also check the Event Viewer (
eventvwr.msc) under Windows Logs > System to confirm Error 164 no longer appears. - Alternative fix: If the error persists, perform a Clean Boot (via
msconfig> Services tab > disable all non-Microsoft services, then restart) to isolate whether a third-party service or startup program is causing the thread leak.