You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by mat <fo...@gmail.com> on 2007/04/18 16:36:13 UTC

Mina Exception

I got following exception:

Exception in thread "Thread-13" java.lang.OutOfMemoryError: Java heap space
2007/4/18 ��
09:02:30 org.apache.mina.common.support.DefaultExceptionMonitor e
xceptionCaught
Unexpected exception.
java.lang.OutOfMemoryError: Java heap space

Can anyone explain?

Re: Mina Exception

Posted by mat <fo...@gmail.com>.
Great. Thanks for your explanation in details.

2007/4/19, Maarten Bosteels <mb...@gmail.com>:
>
> On 4/19/07, mat <fo...@gmail.com> wrote:
> >
> > My understanding is that the exception is from mina itself right since
> it
> > was caught by mina monitor. If so, I really worry about how to solve
> this
> > problem. I have 4G memory on my server.
>
>
>
> The place where an OutOfMemoryException is caught has usually
> little to do with the cause of the OutOfMemoryException.
>
> How many of those 4G did you assign to the JVM ?
> That is what really matters, since the JVM will not automatically claim
> all
> your physical memory.
>
> http://www.caucho.com/resin-3.0/performance/jvm-tuning.xtp
> http://blogs.sun.com/watt/resource/jvm-options-list.html
>
> Maarten
>
> 2007/4/19, Emmanuel Lecharny <el...@gmail.com>:
> > >
> > > The DefaultExceptionMonitor class is a catch all for any uncaught
> > > exception
> > > (like OutOfMemoryExceptions).
> > >
> > > The error you get really mean you are short of memory.
> > >
> > > On 4/18/07, mat <fo...@gmail.com> wrote:
> > > >
> > > > hi there, thanks
> > > >
> > > > but why
> > > >
> org.apache.mina.common.support.DefaultExceptionMonitorexceptionCaught?
> > > > What is that supposed to mean?
> > > >
> > > >
> > > > 2007/4/18, Julien Vermillard <jv...@archean.fr>:
> > > > >
> > > > > Le mercredi 18 avril 2007 à 22:36 +0800, mat a écrit :
> > > > > > I got following exception:
> > > > > >
> > > > > > Exception in thread "Thread-13" java.lang.OutOfMemoryError: Java
> > > heap
> > > > > space
> > > > > > 2007/4/18
> > > > > > 09:02:30 org.apache.mina.common.support.DefaultExceptionMonitore
> > > > > > xceptionCaught
> > > > > > Unexpected exception.
> > > > > > java.lang.OutOfMemoryError: Java heap space
> > > > > >
> > > > > > Can anyone explain?
> > > > > Hi Mat,
> > > > > You simply ran out of memory. Is it was during a huge load test ?
> > > > > Julien
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Regards,
> > > Cordialement,
> > > Emmanuel Lécharny
> > > www.iktek.com
> > >
> >
>

Re: Mina Exception

Posted by Maarten Bosteels <mb...@gmail.com>.
On 4/19/07, mat <fo...@gmail.com> wrote:
>
> My understanding is that the exception is from mina itself right since it
> was caught by mina monitor. If so, I really worry about how to solve this
> problem. I have 4G memory on my server.



The place where an OutOfMemoryException is caught has usually
little to do with the cause of the OutOfMemoryException.

How many of those 4G did you assign to the JVM ?
That is what really matters, since the JVM will not automatically claim all
your physical memory.

http://www.caucho.com/resin-3.0/performance/jvm-tuning.xtp
http://blogs.sun.com/watt/resource/jvm-options-list.html

Maarten

2007/4/19, Emmanuel Lecharny <el...@gmail.com>:
> >
> > The DefaultExceptionMonitor class is a catch all for any uncaught
> > exception
> > (like OutOfMemoryExceptions).
> >
> > The error you get really mean you are short of memory.
> >
> > On 4/18/07, mat <fo...@gmail.com> wrote:
> > >
> > > hi there, thanks
> > >
> > > but why
> > > org.apache.mina.common.support.DefaultExceptionMonitorexceptionCaught?
> > > What is that supposed to mean?
> > >
> > >
> > > 2007/4/18, Julien Vermillard <jv...@archean.fr>:
> > > >
> > > > Le mercredi 18 avril 2007 à 22:36 +0800, mat a écrit :
> > > > > I got following exception:
> > > > >
> > > > > Exception in thread "Thread-13" java.lang.OutOfMemoryError: Java
> > heap
> > > > space
> > > > > 2007/4/18
> > > > > 09:02:30 org.apache.mina.common.support.DefaultExceptionMonitor e
> > > > > xceptionCaught
> > > > > Unexpected exception.
> > > > > java.lang.OutOfMemoryError: Java heap space
> > > > >
> > > > > Can anyone explain?
> > > > Hi Mat,
> > > > You simply ran out of memory. Is it was during a huge load test ?
> > > > Julien
> > > >
> > > >
> > >
> >
> >
> >
> > --
> > Regards,
> > Cordialement,
> > Emmanuel Lécharny
> > www.iktek.com
> >
>

Re: Mina Exception

Posted by mat <fo...@gmail.com>.
My understanding is that the exception is from mina itself right since it
was caught by mina monitor. If so, I really worry about how to solve this
problem. I have 4G memory on my server.

2007/4/19, Emmanuel Lecharny <el...@gmail.com>:
>
> The DefaultExceptionMonitor class is a catch all for any uncaught
> exception
> (like OutOfMemoryExceptions).
>
> The error you get really mean you are short of memory.
>
> On 4/18/07, mat <fo...@gmail.com> wrote:
> >
> > hi there, thanks
> >
> > but why
> > org.apache.mina.common.support.DefaultExceptionMonitorexceptionCaught?
> > What is that supposed to mean?
> >
> >
> > 2007/4/18, Julien Vermillard <jv...@archean.fr>:
> > >
> > > Le mercredi 18 avril 2007 à 22:36 +0800, mat a écrit :
> > > > I got following exception:
> > > >
> > > > Exception in thread "Thread-13" java.lang.OutOfMemoryError: Java
> heap
> > > space
> > > > 2007/4/18
> > > > 09:02:30 org.apache.mina.common.support.DefaultExceptionMonitor e
> > > > xceptionCaught
> > > > Unexpected exception.
> > > > java.lang.OutOfMemoryError: Java heap space
> > > >
> > > > Can anyone explain?
> > > Hi Mat,
> > > You simply ran out of memory. Is it was during a huge load test ?
> > > Julien
> > >
> > >
> >
>
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>

Re: java.io.IOException: Connection reset by peer

Posted by Trustin Lee <tr...@gmail.com>.
Hi Philipp,

On 4/19/07, Philipp <ph...@thuerwaechter.de> wrote:
> hi there,
>
> sorry if this was up before, but i could not find it in the archive.
>
> we use mina 0.8.4 (jdk 1.5.0) for a kind of http server. we realize http
> keep-alive connections, so we do not close the connection after
> messageSent event, but after a while on the sessionIdle event in a
> ProtocolHandlerAdapter Implementation.
>
> everything works fine for firefox and opera. but when the internet
> explorer 7 client close the connection before the server does, we get
> the following exeption:
>
> java.io.IOException: Connection reset by peer
>         at sun.nio.ch.FileDispatcher.read0(Native Method)
>         at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:21)
>         at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)
>         at sun.nio.ch.IOUtil.read(IOUtil.java:200)
>         at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:207)
>         at
> org.apache.mina.io.socket.SocketIoProcessor.read(SocketIoProcessor.java:267)
>         at
> org.apache.mina.io.socket.SocketIoProcessor.processSessions(SocketIoProcessor.java:240)
>         at
> org.apache.mina.io.socket.SocketIoProcessor.access$200(SocketIoProcessor.java:43)
>         at
> org.apache.mina.io.socket.SocketIoProcessor$Worker.run(SocketIoProcessor.java:541)
>
> it seems the internet explorer triggers the SocketChannel somehow, when
> closing the socket! it seems that the exception has no other effect.
>
> can anyone help? what are we doing wrong. should we just ignore the
> exception?

Yep, you can simply ignore the exception.  It means the remote peer
(IE in this case) closed the connection.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

java.io.IOException: Connection reset by peer

Posted by Philipp <ph...@thuerwaechter.de>.
hi there,

sorry if this was up before, but i could not find it in the archive.

we use mina 0.8.4 (jdk 1.5.0) for a kind of http server. we realize http
keep-alive connections, so we do not close the connection after
messageSent event, but after a while on the sessionIdle event in a
ProtocolHandlerAdapter Implementation.

everything works fine for firefox and opera. but when the internet
explorer 7 client close the connection before the server does, we get
the following exeption:

java.io.IOException: Connection reset by peer
        at sun.nio.ch.FileDispatcher.read0(Native Method)
        at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:21)
        at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)
        at sun.nio.ch.IOUtil.read(IOUtil.java:200)
        at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:207)
        at
org.apache.mina.io.socket.SocketIoProcessor.read(SocketIoProcessor.java:267)
        at
org.apache.mina.io.socket.SocketIoProcessor.processSessions(SocketIoProcessor.java:240)
        at
org.apache.mina.io.socket.SocketIoProcessor.access$200(SocketIoProcessor.java:43)
        at
org.apache.mina.io.socket.SocketIoProcessor$Worker.run(SocketIoProcessor.java:541)

it seems the internet explorer triggers the SocketChannel somehow, when
closing the socket! it seems that the exception has no other effect.

can anyone help? what are we doing wrong. should we just ignore the
exception?

thanks in advance for any help





Re: Mina Exception

Posted by Emmanuel Lecharny <el...@gmail.com>.
The DefaultExceptionMonitor class is a catch all for any uncaught exception
(like OutOfMemoryExceptions).

The error you get really mean you are short of memory.

On 4/18/07, mat <fo...@gmail.com> wrote:
>
> hi there, thanks
>
> but why
> org.apache.mina.common.support.DefaultExceptionMonitorexceptionCaught?
> What is that supposed to mean?
>
>
> 2007/4/18, Julien Vermillard <jv...@archean.fr>:
> >
> > Le mercredi 18 avril 2007 à 22:36 +0800, mat a écrit :
> > > I got following exception:
> > >
> > > Exception in thread "Thread-13" java.lang.OutOfMemoryError: Java heap
> > space
> > > 2007/4/18
> > > 09:02:30 org.apache.mina.common.support.DefaultExceptionMonitor e
> > > xceptionCaught
> > > Unexpected exception.
> > > java.lang.OutOfMemoryError: Java heap space
> > >
> > > Can anyone explain?
> > Hi Mat,
> > You simply ran out of memory. Is it was during a huge load test ?
> > Julien
> >
> >
>



-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Re: Mina Exception

Posted by mat <fo...@gmail.com>.
hi there, thanks

but why org.apache.mina.common.support.DefaultExceptionMonitorexceptionCaught?
What is that supposed to mean?


2007/4/18, Julien Vermillard <jv...@archean.fr>:
>
> Le mercredi 18 avril 2007 à 22:36 +0800, mat a écrit :
> > I got following exception:
> >
> > Exception in thread "Thread-13" java.lang.OutOfMemoryError: Java heap
> space
> > 2007/4/18
> > 09:02:30 org.apache.mina.common.support.DefaultExceptionMonitor e
> > xceptionCaught
> > Unexpected exception.
> > java.lang.OutOfMemoryError: Java heap space
> >
> > Can anyone explain?
> Hi Mat,
> You simply ran out of memory. Is it was during a huge load test ?
> Julien
>
>

Re: Mina Exception

Posted by Julien Vermillard <jv...@archean.fr>.
Le mercredi 18 avril 2007 à 22:36 +0800, mat a écrit :
> I got following exception:
> 
> Exception in thread "Thread-13" java.lang.OutOfMemoryError: Java heap space
> 2007/4/18 
> 09:02:30 org.apache.mina.common.support.DefaultExceptionMonitor e
> xceptionCaught
> Unexpected exception.
> java.lang.OutOfMemoryError: Java heap space
> 
> Can anyone explain?
Hi Mat,
You simply ran out of memory. Is it was during a huge load test ?
Julien