Team,

We just had an OOM incident in our dev environments after upgrading from
Camel 2.10.3 to 2.13.1. Heap settings have remained untouched.

A heap dump showed millions of DefaultMessageHistory instances retained
(see screenshot), along with their corresponding Date and StopWatch
instances. Obviously our first solution will be to disable message history
in all contexts.

Digging deeper, I'm utterly confused because I don't seem to find the GC
roots that are keeping these objects alive.

OQL query for VisualVM:

select x from org.apache.camel.impl.DefaultMessageHistory x where
count(referrers(x)) > 0

returns many objects, which is good.

However, they are referenced by some Object[] which in turn has no
referrers (!), see screenshot.

Using the "Find nearest GC root" feature yields no results either.

This mysterious Object[] seems to be filled from position 4072 onwards (see
screenshot), it has 9k+ items... Perhaps some kind of Queue? There are many
more Object[] arrays storing DefaultMessageHistory instances too.

What's your take?

Have you come across such an issue before?

Someone who is outright familiar with the internal workings of the Message
History functionality has any clue what's the purpose of this array?

Thanks,
Raúl.


[image: Inline image 3]

[image: Inline image 1]

[image: Inline image 2]

*Raúl Kripalani*
Apache Camel PMC Member & Committer | Enterprise Architect, Open Source
Integration specialist
http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
http://blog.raulkr.net | twitter: @raulvk

Reply via email to