OutOfMemoryError in ActiveMQ Broker due to large KahaDB PageFile instance
Issue
The ActiveMQ broker runs out of memory:
java.lang.OutOfMemoryError: Java heap space.
Upon inspection of the heap dump that was written at the time of the OutOfMemoryError , it shows a large instance of org.apache.activemq.store.kahadb.KahaDBStore, retaining several hundred MB of JVM heap.
This instance internally references a org.apache.activemq.store.kahadb.disk.page.PageFile which accumulates around the same amount of heap space.
This PageFile instance holds a reference to org.apache.activemq.util.LRUCache that contains 10,000 entries and retains most of the heap space.
Environment
- JBoss Fuse 6.3 R5
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.