Hi Ashish, I think we tracked down the source of the problem a bit more.. The OOM seems to be related to IMAP. Our IMAP server component is using the StreamIoHandler (its the only one of our components who use this handler). So I suspect there is the problem.
So there are two possible problems: 1) Bug in StreamIoHandler 2) Wrong usage of StreamIoHandler. Our implementations is here: http://svn.apache.org/viewvc/james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/mina/ImapIoHandler.java?view=markup Thx, Norman 2010/4/5 Eric Charles <eric.char...@u-mangate.com>: > Yes, > > One instance of > org.apache.mina.core.session.DefaultIoSessionDataStructureFactory$DefaultWriteRequestQueue > contains : > - for 2.0.0-RC1 : one instance of org.apache.mina.util.CircularQueue with an > array of many > org.apache.mina.filter.codec.ProtocolCodecFilter$EncodedWriteRequest > - for 2.0.0-RC2-SNAPSHOT : many recursive instances of > java.util.concurrent.ConcurrentLinkedQueue > > Tks, > Eric > > > On 04/05/2010 10:51 AM, Norman Maurer wrote: >> >> I think thats only because mina-trunk is not using CircularQueue >> anymore. It now seems to use ConcurrentLinkedQueue. >> >> Bye, >> Norman >> >> 2010/4/5 Eric Charles<eric.char...@u-mangate.com>: >> >>> >>> Hi Ashish, >>> >>> Please also note that we have 2 different exceptions: >>> - http://people.apache.org/~norman/oom/Screenshot.png that occurs with >>> mina >>> 2.0.0-RC1 >>> - >>> >>> http://people.apache.org/~norman/oom/Screenshot-Eclipse_Memory_Analyzer.png >>> that occurs with 2.0.0-RC2-SNAPSHOT >>> >>> It happens on jdk 1.6 (and also 1.7) >>> >>> Tks, >>> >>> Eric >>> >>> >>> On 04/05/2010 10:01 AM, Ashish wrote: >>> >>>> >>>> Thanks Norman, >>>> >>>> Will try to see this as soon as I can get some time from paid job :) >>>> >>>> cheers >>>> ashish >>>> >>>> On Mon, Apr 5, 2010 at 1:27 PM, Norman Maurer >>>> <norman.mau...@googlemail.com> wrote: >>>> >>>> >>>>> >>>>> Hi Ashish, >>>>> >>>>> thx for your reply. The problem is sometimes it takes sometime to get >>>>> the OOM, other times it happens within one minute. One of our users >>>>> reported to me that it happened within 1 minute (10 seconds and 30 >>>>> seconds), after he switched to MINA trunk. So it seems it is faster >>>>> reproducable with MINA trunk. I uploaded the screenshot of Eclipse >>>>> Memory Analyzer to : >>>>> >>>>> >>>>> >>>>> http://people.apache.org/~norman/oom/Screenshot-Eclipse_Memory_Analyzer.png >>>>> >>>>> This was the one we got with MINA trunk. So you it again shows all the >>>>> memory allocated by MINA. >>>>> >>>>> To reproduce the OOM you must perform the following steps: >>>>> >>>>> 1) svn checkout http://svn.apache.org/repos/asf/server/trunk >>>>> james-trunk >>>>> 2) cd james-trunk >>>>> 2) mvn clean package >>>>> 3) tar xfvz >>>>> spring-deployment/target/james-spring-deployment-3.0-M1-bin.tar.gz >>>>> 4) cd james-string-deploymnet-3.0-M1/bin >>>>> 5) sudo ./run.sh >>>>> 6) telnet localhost 4555 (user root, pass root) >>>>> 7) adduser test test >>>>> 8) quit >>>>> >>>>> Now bomb the server with emails. You can use for example smtp-source >>>>> for it (wich is included in postfix) >>>>> 9) smtp-source -s 20 -l 10100 -m 200000 -c -f t...@test.de -t test >>>>> localhost:25 >>>>> >>>>> This will bomb the servers with 200000 emails with 20 concurrent >>>>> sessions. >>>>> >>>>> Hope this helps, >>>>> Bye, >>>>> Norman >>>>> >>>>> 2010/4/5 Ashish<paliwalash...@gmail.com>: >>>>> >>>>> >>>>>> >>>>>> On Sun, Apr 4, 2010 at 12:59 AM, Norman Maurer<nor...@apache.org> >>>>>> wrote: >>>>>> >>>>>> >>>>>>> >>>>>>> Hi all, >>>>>>> >>>>>>> we at JAMES use MINA since a while now for our socket stuff. After >>>>>>> doing some stress tests we encountered some OOM Exceptions. The same >>>>>>> was seen by one of our users which use JAMES trunk. After debugging >>>>>>> stuff it seems like the cause of the OOM is MINA. We took some heap >>>>>>> which shows that MINA is takin the most memory. The class which shows >>>>>>> the memory usage was: >>>>>>> >>>>>>> org.apache.mina.filter.codec.ProtocolCodecFilter$EncodedWriteRequest >>>>>>> >>>>>>> I attach the screnshots which shows the problem. Any idea ? We are >>>>>>> using MINA-2.0.0-RC1. >>>>>>> >>>>>>> Maybe I'm wrong and the whole OOM is not related to MINA at all.. >>>>>>> >>>>>>> Thanks, >>>>>>> Norman >>>>>>> >>>>>>> Ps: Please keep server-dev in the cc >>>>>>> >>>>>>> >>>>>> >>>>>> Norman, >>>>>> >>>>>> Is there a way to reproduce this? I just want to try it out myself and >>>>>> debug. >>>>>> >>>>>> -- >>>>>> thanks >>>>>> ashish >>>>>> >>>>>> Blog: http://www.ashishpaliwal.com/blog >>>>>> My Photo Galleries: http://www.pbase.com/ashishpaliwal >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org >>> For additional commands, e-mail: server-dev-h...@james.apache.org >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org >> For additional commands, e-mail: server-dev-h...@james.apache.org >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org > For additional commands, e-mail: server-dev-h...@james.apache.org > >