I have a hazy memory of someone from Sun or Blackdown saying that
they tried to allocate 2MB of stack for every thread that's created.
Though it sounds like Scott has a better handle on your actual problem, I
think that was quoted as one of the pitfalls of using many many threads.
Aaron
On Sun, 29 Jul 2001, Chris Kimpton wrote:
> Hi,
>
> When running the jbosstest's on my linux/2.2.14/sun jdk1.3.1 box I
> occasionally get the error:
>
> Exception in thread "main" java.lang.OutOfMemoryError: unable
> to create new native thread
> at java.lang.Thread.start(Native Method)
> at Threads.main(Threads.java:19)
>
> I am assuming that this error is due to hitting the per user process
> limit. The box returns the following from ulimit -a
>
> core file size (blocks) 0
> data seg size (kbytes) unlimited
> file size (blocks) unlimited
> max locked memory (kbytes) unlimited
> max memory size (kbytes) unlimited
> open files 1024
> pipe size (512 bytes) 8
> stack size (kbytes) unlimited
> cpu time (seconds) unlimited
> max user processes 256
> virtual memory (kbytes) unlimited
>
> >From which I would think that there is a limit of 256 processes per
> user.
>
> When running the attached test program, ( java Threads 1000 60 ), it
> gives the error when creating the 104th or so thread...
>
> On my home machine, with the same kernel, I get 245 threads
> created...
>
> I've tried recompiling the kernel to set the max procs to 4000.
>
> But the limit it then hits is around 893 threads...
>
> Of course, my win2k has no problem at all ;-)
>
> Does anyone know the most the threads that the jbosstest is likely to
> create in the server? in the client?
>
> And why I am getting such high differences in the limits on similar
> machines?
>
> And mainly, why the maximum limit seems to be around 893? Not the
> 4000 that should be available?
>
> I've tried playing with the memory settings, but they seem to have no
> effect, no matter how much memory I give the jvm.
>
> Thanks for any help,
> Chris
>
> PS The IBM jdk seems to have the same limit - but just does NOT give
> an error! The blackdown/green threads jvm handles things without a problem...
>
> =====
> Need somewhere to Live in London - http://freeflats.com
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development