We have a test server which hosts lots of test applications. when there are lots of process (or threads) running, we found new process or thread cannot be created:
- for C program: "cannot fork, resource unavailable"
- for java program: it throws exception "OutOfMemory, unable to create native thread"
I think it is due to the hard limit to the maximum number of process. I tried to set ulimit -n 255085
. ulimit shows below:
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
open files (-n) 90000
pipe size (512 bytes, -p) 10
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 255085
virtual memory (kbytes, -v) unlimited
but it doesn't work. I tried to run many processes at same time with different users and all they stops with same error at same time. therefore, I think there is a "limit" to the whole system regardless to the users logged in.