HornetQ streaming big StreamMessages causes 'OutOfMemoryError: Java heap space'
Environment
- JBoss Service Oriented Architecture Platform (SOA-P)
Issue
- The Java heap dump shows the largest retention under a thread that with the same names as the thread associated with the
OutOfMemoryErrorin the JBossserver.log. - Retention in
org.jboss.netty.buffer.BigEndianHeapChannelBufferbytearray. - Java heap dump created by the JVM with
-XX:+HeapDumpOnOutOfMemoryErroroption is significantly smaller than the max heap size (-Xmx). - Heap dump analysis shows the retention is a
bytearray.
Resolution
Increase the heap size. The byte array is too small and tries to allocate a larger buffer and cannot. This results in a heap dump created that is much smaller than the maximum heap size Xmx.
Product(s)
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.