Whenever you click on a thread restriction - or, as mentioned, ends out of the address space of a virtual process due to the number of threads - you ... do it wrong. More threads are not scalable. Especially when you do inline programming. Instead, you can handle requests in the thread pool. Use poll(2)to process multiple connections to fewer threads. This is a beautiful well-flowing area, and libraries (for example, ACE, asio) used this model for a good reason.
The thread per request model is mostly popular because of this (perceived) simple design.
( ), .
, , , : backlog bind/accept, ! (: , )
Re:
ulimit , , ? , ulimit , ~ 10-15 .
, , . ; pthread * _destroy, , . , . (vlagrind/helgrind )