HornetQ throwing an OutOfMemoryException

Solution Unverified - Updated

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5.1.1
  • HornetQ
    • 2.5.5

Issue

  • We're seeing an OOME in our production system. Can you provide us with a fix for this please ?
ERROR [OrderedExecutorFactory] Caught unexpected Throwable
java.lang.OutOfMemoryError: Direct buffer memory
    at java.nio.Bits.reserveMemory(Bits.java:633)
    at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:98)
    at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
    at org.hornetq.core.paging.impl.PageImpl.read(PageImpl.java:119)
    at org.hornetq.core.paging.cursor.impl.PageCursorProviderImpl.getPageCache(PageCursorProviderImpl.java:188)
    at org.hornetq.core.paging.cursor.impl.PageCursorProviderImpl.getPageCache(PageCursorProviderImpl.java:140)
    at org.hornetq.core.paging.cursor.impl.PageCursorProviderImpl.getMessage(PageCursorProviderImpl.java:117)
    at org.hornetq.core.paging.cursor.impl.PageSubscriptionImpl.queryMessage(PageSubscriptionImpl.java:527)
    at org.hornetq.core.paging.cursor.PagedReferenceImpl.getPagedMessage(PagedReferenceImpl.java:73)
    at org.hornetq.core.paging.cursor.PagedReferenceImpl.getMessage(PagedReferenceImpl.java:59)
    at org.hornetq.core.server.impl.QueueImpl$5.run(QueueImpl.java:1222)
    at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

Resolution

  • This is a known problem associated with Netty1 and this has been fixed in the HornetQ version shipped with JBoss-EAP-5.1.2
Components
Category
Tags

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.