Hi!

I'm debugging a memory leak in my MINA application. Of course the leak only
happens after a few hours of real world usage and not in my development
environment. :-) I need to understand where the actual memory for ByteBuffers 
comes from.

My problem is memory that seems to be allocated outside of the normal java
memory space. Normally my program uses about 400MB of heap memory, 30MB of
other memory and the java process (sun jre 1.5.0) uses 1.1GB of memory. But
after a few hours the process starts to grow rapidly until it dies, while
heap and other memory usage (as reported inside the jvm and in my profiler)
stays about the some.

I suspect the memory leak to be related to either MySQL (as an external
library) or ByteBuffers.

I double-checked that at every occurence of SQL statements all ResultSets and
Statements are always properly closed. So unless I'm hitting a bug in the
driver I think that everything should be fine here.

The other possibility is that I'm leaving some ByteBuffers hanging around.

I'm still using MINA 0.8.2, so all my ByteBuffers will probably be direct
buffers. Are they included in the number returned by
Runtime.getRuntime().totalMemory() (this number doesn't grow at all)? Would
the size of the allocated ByteBuffers be reflected in the heap size or in the
number of object on the heap?

Any other idea on how to find out where this alarming (non-heap) memory usage
is coming from?

bye, Paul.

--
ARIVA.DE AG, Paul Mallach, Produktentwicklung
Walkerdamm 17, 24103 Kiel
Tel. (+49) 0431 97108-23, Fax. (+49) 0431 97108-29
E-Mail: [EMAIL PROTECTED], Web: www.ariva.de <http://www.ariva.de/>

-------------------------------------------------------

-- 
ARIVA.DE AG, Paul Mallach, Produktentwicklung
Walkerdamm 17, 24103 Kiel
Tel. (+49) 0431 97108-23, Fax. (+49) 0431 97108-29 
E-Mail: [EMAIL PROTECTED], Web: www.ariva.de <http://www.ariva.de/>

Reply via email to