I have .Net application which communicates with some COM object, and I got the following exception in the COM: System.Runtime.InteropServices.COMException (0x800700A4): No more threads can be created in the system. (Exception from HRESULT: 0x800700A4)
Does it means that the COM object created too many threads (as far as I know the threads limit is for process) or that there are too many threads in Windows (maybe too many handles)? Or who's responsible for the failure, my system, or the COM object?
The root cause for this issue was that the COM object was creating a new thread for each call, resulting in resource likage.
This article (archived version) explains the threads limit issue:
"Because each thread consumes part of a process’s address space, processes have a basic limit on the number of threads they can create that’s imposed by the size of their address space divided by the thread stack size."
User contributions licensed under CC BY-SA 3.0