What does Windows error code 164 (ERROR_MAX_THRDS_REACHED) mean?

 
Could be also:
ConstantTypeOS
CNSS_FILE_SYSTEM_FILTERBugCheck CodeWindows
Previous Next
ERROR_SIGNAL_PENDING ERROR_LOCK_FAILED

ERROR_MAX_THRDS_REACHED

What ERROR_MAX_THRDS_REACHED means

No additional threads can be created because the applicable thread limit has been reached. This result can represent process address-space exhaustion, runtime limits, subsystem quotas, or an application thread leak. CPU utilization may still be low because the limiting resource is thread metadata or stack reservation.

Common causes

  • Unbounded per-connection thread creation
  • Large reserved stacks exhaust virtual address space
  • A library keeps background threads after clients are closed
  • The process runs inside a constrained job or compatibility subsystem

How to investigate

  1. Record process thread count and virtual-memory layout
  2. Group threads by start address and stack signature
  3. Inspect configured stack size and linker settings
  4. Test whether a bounded worker pool eliminates the failure

Developer guidance

Design backpressure before the limit is reached. Reject or queue excess work, and use asynchronous operations for high fan-out workloads.

Administrator and support guidance

Collect thread and memory diagnostics before restart. Increasing limits without correcting unbounded creation can move the failure to a more damaging resource.

How this code differs from related results

ERROR_TOO_MANY_TCBS is closely related but may be emitted specifically by older thread-control-block management.

References


Looking for a different code? Search another status or error code.