Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-5115

java.lang.OutOfMemoryError: Direct buffer memory

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 10.0.0.CR5
    • 10.0.0.Beta1
    • JMS
    • None
    • Hide
      1. Start two servers
      2. Send 100 messages with size 5MB to the first server
      3. Restart the first server
      4. Create a core bridge, which will forward messages to the second server
      5. Receive messages from the second server

      The OutOfMemoryError occurs on the first server after creating of core bridge and some messages are not delivered.

      Show
      Start two servers Send 100 messages with size 5MB to the first server Restart the first server Create a core bridge, which will forward messages to the second server Receive messages from the second server The OutOfMemoryError occurs on the first server after creating of core bridge and some messages are not delivered.

      Stacktrace

      16:02:52,112 ERROR [org.apache.activemq.artemis.core.client] (Thread-23 (ActiveMQ-server-ActiveMQServerImpl::serverUUID=1d6a38c6-44e8-11e5-9786-154a71a87770-460139716)) AMQ214017: Caught unexpected Throwable: java.lang.OutOfMemoryError: Direct buffer memory
      at java.nio.Bits.reserveMemory(Bits.java:658) [rt.jar:1.8.0_51]
      at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:123) [rt.jar:1.8.0_51]
      at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311) [rt.jar:1.8.0_51]
      at io.netty.buffer.PoolArena$DirectArena.newChunk(PoolArena.java:437) [netty-all-4.0.26.Final.jar:4.0.26.Final]
      at io.netty.buffer.PoolArena.allocateNormal(PoolArena.java:179) [netty-all-4.0.26.Final.jar:4.0.26.Final]
      at io.netty.buffer.PoolArena.allocate(PoolArena.java:168) [netty-all-4.0.26.Final.jar:4.0.26.Final]
      at io.netty.buffer.PoolArena.reallocate(PoolArena.java:280) [netty-all-4.0.26.Final.jar:4.0.26.Final]
      at io.netty.buffer.PooledByteBuf.capacity(PooledByteBuf.java:110) [netty-all-4.0.26.Final.jar:4.0.26.Final]
      at io.netty.buffer.AbstractByteBuf.ensureWritable(AbstractByteBuf.java:251) [netty-all-4.0.26.Final.jar:4.0.26.Final]
      at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:817) [netty-all-4.0.26.Final.jar:4.0.26.Final]
      at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:825) [netty-all-4.0.26.Final.jar:4.0.26.Final]
      at org.apache.activemq.artemis.core.buffers.impl.ChannelBufferWrapper.writeBytes(ChannelBufferWrapper.java:575) [artemis-commons-1.0.0.jar:1.0.0]
      at org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionContinuationMessage.encodeRest(SessionContinuationMessage.java:76) [artemis-core-client-1.0.0.jar:1.0.0]
      at org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionSendContinuationMessage.encodeRest(SessionSendContinuationMessage.java:100) [artemis-core-client-1.0.0.jar:1.0.0]
      at org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl.encode(PacketImpl.java:283) [artemis-core-client-1.0.0.jar:1.0.0]
      at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.send(ChannelImpl.java:246) [artemis-core-client-1.0.0.jar:1.0.0]
      at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.send(ChannelImpl.java:216) [artemis-core-client-1.0.0.jar:1.0.0]
      at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext.sendLargeMessageChunk(ActiveMQSessionContext.java:441) [artemis-core-client-1.0.0.jar:1.0.0]
      at org.apache.activemq.artemis.core.client.impl.ClientProducerImpl.largeMessageSendServer(ClientProducerImpl.java:433) [artemis-core-client-1.0.0.jar:1.0.0]
      at org.apache.activemq.artemis.core.client.impl.ClientProducerImpl.largeMessageSend(ClientProducerImpl.java:367) [artemis-core-client-1.0.0.jar:1.0.0]
      at org.apache.activemq.artemis.core.client.impl.ClientProducerImpl.doSend(ClientProducerImpl.java:297) [artemis-core-client-1.0.0.jar:1.0.0]
      at org.apache.activemq.artemis.core.client.impl.ClientProducerImpl.send(ClientProducerImpl.java:132) [artemis-core-client-1.0.0.jar:1.0.0]
      at org.apache.activemq.artemis.core.server.cluster.impl.BridgeImpl$2.run(BridgeImpl.java:711) [artemis-server-1.0.0.jar:1.0.0]
      at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:105) [artemis-core-client-1.0.0.jar:1.0.0]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_51]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_51]
      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]

        1. server1.xml
          28 kB
          Erich Duda
        2. server2.xml
          27 kB
          Erich Duda

            jmesnil1@redhat.com Jeff Mesnil
            eduda_jira Erich Duda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: