directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kaspar Luethi" <kas...@humantools.com>
Subject Re: [MINA] Apparent DEADLOCK in com.mchange.v2.async.ThreadPoolAsynchronousRunner
Date Tue, 10 Jan 2006 23:29:18 GMT
hi alessandro

2500 users sounds good. were they also sending actual data and
it being broacasted to all other users?

i think this is a memory problem and not a deadlock case.
deadlocks can occurr easily, when objects cannot be created
due to memory shortage and somecode is waiting for it...

with 2500 users you likely also have more than 2500 mina ByteBuffers
in memory, eventually a multiple of that. now it depends how big those
buffers are...2KB? 20MB?! maybe your mac just has not enough RAM :)

so you should watch the memory consumption while stress testing.
do you have something like the "top" command on OS X? it helps too
for watching the cpu load.

try to give your JVM more memory. at first you could try the -server
switch, which does allow the JVM to allocate more memory by default
along with some other differences in the JRE and garbage collection.
i don't know if apple's java implementation has this option.

for the sun JVM there is a list of options (many for solaris only) at
http://java.sun.com/docs/hotspot/VMOptions.html

kaspar


Alessandro Torrisi wrote:
> Hi ! Yesterday I put in stress my direct connect hub software on Mac
> Os X 10.3.4 Tiger with latest Java implementation.
> Max fake users reached number is 2500. When I reached this number the
> application has thrown this exception:
>
> Exception in thread "IoThreadPool-1" java.lang.OutOfMemoryError: Java
> heap space
> Exception in thread "IoThreadPool-4" java.lang.OutOfMemoryError: Java
> heap space
> com.mchange.v2.async.ThreadPoolAsynchronousRunner
> $DeadlockDetector@27d98b -- APPARENT DEADLOCK!!! Creating emergency
> threads for unassigned pending tasks!
> Exception in thread "IoThreadPool-3" java.lang.OutOfMemoryError: Java
> heap space
> Exception in thread "Timer-0" java.lang.OutOfMemoryError: Java heap
> space
> 4212917 [SocketAcceptor-0] WARN
> org.apache.mina.common.support.DefaultExceptionMonitor - Unexpected
> exception.
> java.lang.OutOfMemoryError: Java heap space
> Exception in thread "IoThreadPool-2" java.lang.OutOfMemoryError: Java
> heap space
>
> What's this ? Is it directly caused by the Java heap space ? How can
> I avoid it ?
> Thanks and best regards,
>
> Alessandro Torrisi
>
> http://www.alessandrotorrisi.it
>



Mime
View raw message