tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Miehs <>
Subject Re: Threads
Date Thu, 03 Apr 2008 18:03:18 GMT
>> From: Stephen Caine []
>> I have a process that generates hundreds of threads.  Running on Mac
>> OS X 10.5.2 Server, the thread count tops out at approximately 2500.
>> After which, the process is terminated.  The heap size is set to 1
>> gigabyte.  My question is how to increase the capacity of the JVM to
>> handle more threads.  Is the value of 2500 an absolute limit, or can
>> it be modified by setting the thread allocation, increasing heap size
>> or the use of another java option?

What error message are you seeing in catalina.out?

You are probably running out of memory. Each thread needs a certain  
amount of heap and stack.
You may also want to look at the limits you set in the shell

Defaults from mac os x 10.5.2

$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) 6144
file size               (blocks, -f) unlimited
max locked memory       (kbytes, -l) unlimited
max memory size         (kbytes, -m) unlimited
open files                      (-n) 256
pipe size            (512 bytes, -p) 1
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 266
virtual memory          (kbytes, -v) unlimited

View raw message