Luis Neves wrote:
Hi,
Emmanuel Lecharny wrote:
You have plenty of tools to analyze a OOM. Either a commercial tool,
or free tools. Just googling for 'Memory leak java analyzer' will
bring a lot of those guys, like
http://www.manageability.org/blog/stuff/open-source-profilers-for-java.
I'm aware of those tools, I already used Jhat, the IBM HeapAnalyser
and Jconsole to locate the memory "back hole".
My initial assumption that there was a memory leak doesn't seem to be
valid.
Monitoring the heap with JConsole the behaviour is not consistent with
a memory leak, instead of steadily increasing memory over time what I
see is a sudden spike in memory and the subsequent OOM error. The
"holder" for most of the used memory is the field:
private final List<Object> childProducts = new ArrayList<Object>();
in org.apache.mina.filter.codec.statemachine.DecodingStateMachine
My problem is that I don't fully understand the state machine that
Mina uses to process HTTP requests and I can't tell what could cause
the addition of thousands of elements to the "childProducts" field...
anyway...
Can you produce a StackTrace when you get the OOM ? It may help to
understand where the problem has been originated. There is a good luck
you get into an infinite loop somewhere in your code, the point is to
determine when you get into this loop (typically behavior when you get a
sudden spike in a program).
Hope it helps...
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org