Is it possible to increase the thread limit per process?

That's pretty much it -- I can increase memory, file descriptor, etc., but can I increase the number of threads?

(I've got a case where, in an error condition, my threads block [still trying to figure out why] and new ones are still being generated, until I hit a limit of 512 threads.)

Is it possible to increase the thread limit per process?
 
 
Q