Hi, all,

We are using MINA 2.0.0-M5 and I noticed (though jconsole) that the used
memory shoot up and keep growing when doing performance testing.

I used jmap to take a dump and found out there are tons of
NioSocketSession instances that are referenced by
java.lang.ref.Finalizer. Looking at the source code, it is caused by
DefaultIoFilterChain (because it has a finalize method).

I understand that eventually, the memory will be claimed. However, I am
a little concerned with the memory pattern. Is there a reason to have
the finalize method there? 


Thanks,
Yong


P.S. I worked around the problem by calling
session.getFilterChain.clear() on sessionClosed method of the handler
(that's exactly what the finalize method does) and commented out the
finalize method. I am NOT suggesting that it the fix. Without knowing
all the details of the mina system, I figured that it is probably safer
to just do that as a temporary solution..... 

Reply via email to