Le 18/09/14 04:51, Remi Roy a écrit :
> Hi, I use mina 2.0.7 as a server to receive message.
>
> Usually after 2 weeks to server stop to run with an exception out of memory
> (receive from exceptionCaught in mina handler).
>
> My server open 1 connection and never close it. It's a client establish with
> my server and send message. I did some memory monitor and it's look like
> something is never clear in mina. If I close the connection the memory is
> completely cleared by the CG.
>
> The memory is loaded with full of byte[].
>
> I use java 1.6 32 bit. And I have 1G available for java.
>
> Some code :
>
>
> public void messageReceived(IoSession session, Object message) throws
> MinaSupportException {
> //message threatement....
>
> }
This is the part I would like to see, as the codec filter you are using
(unless you used a default codec).
>
> Ay idea? Direction I can looking for my problem?
It's likely you are storing something in memory and never release it.
It's hard to tell without seing the code you wrote...
Have you tried to profile your application ?