Есть ли лимит на количество потоков у процесса?https://www.google.com/search?q=process+thread+limit
Linux doesn't have a separate threads per process limit, just a limit on the total number of processes on the system (threads are essentially just processes with a shared address space on Linux) which you can view like this:
You'll hit other problems rather than any explicit cap. As explained by Raymond Chen, every thread requires some memory for bookkeeping, notably its stack (where the thread is in its execution of the program). 32-bit processes can only address 4 GB of memory, which will fit about 2,000 threads with the default 1 MB stack allocation per thread or about 12,000 with the smallest possible allocation of 64 KB per thread. 64-bit processes don't have problems with address space, but rather with the actual allocations. My system runs out of memory a little after testlimit64 -t passes 270,000 threads created.