Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-2191

Artemis broker leaks memory when creating temporary queues

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • AMQ 7.2.4.GA
    • A-MQ 7.0.0.GA
    • broker-core
    • None

      Artemis broker seems to be leaking memory when creating and deleting temporary queues. Running clients with code like below

      try (QueueSession session = queueConnection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE)) {
            int numberOfTemporaryQueues = 100;
            for (int i = 0; i < numberOfTemporaryQueues; i++) {
              TemporaryQueue temporaryQueue = session.createTemporaryQueue();
              temporaryQueue.delete();
            }
          } catch (JMSException e) {
            e.printStackTrace();
          }
      

      would result in

      2018-12-07 11:33:55,822 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: JBoss EAP 7.1.5.GA (WildFly Core 3.0.19.Final-redhat-00001) started in 4603ms - Started 454 of 682 services (372 services are lazy, passive or on-demand)
      2018-12-07 11:39:59,515 WARN [org.apache.activemq.artemis.core.server] (Thread-23 (ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$4@29bf5863)) Sending unexpected exception to the client: java.lang.OutOfMemoryError: GC overhead limit exceeded
      at java.util.Arrays.copyOfRange(Arrays.java:3664)
      at java.lang.String.<init>(String.java:207)
      at java.lang.String.substring(String.java:1969)
      at javax.management.ObjectName.construct(ObjectName.java:645)
      at javax.management.ObjectName.<init>(ObjectName.java:1382)
      at javax.management.ObjectName.getInstance(ObjectName.java:1273)
      at org.apache.activemq.artemis.api.core.management.ObjectNameBuilder.getQueueObjectName(ObjectNameBuilder.java:106)
      at org.apache.activemq.artemis.core.server.management.impl.ManagementServiceImpl.unregisterQueue(ManagementServiceImpl.java:255)
      at org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl.removeBinding(PostOfficeImpl.java:481)
      at org.apache.activemq.artemis.core.server.impl.QueueImpl.deleteQueue(QueueImpl.java:1429)
      at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.destroyQueue(ActiveMQServerImpl.java:1767)
      at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.destroyQueue(ActiveMQServerImpl.java:1732)
      at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.deleteQueue(ServerSessionImpl.java:635)
      at org.apache.activemq.artemis.core.protocol.core.ServerSessionPacketHandler.internalHandlePacket(ServerSessionPacketHandler.java:272)
      at org.apache.activemq.artemis.core.protocol.core.ServerSessionPacketHandler.lambda$handlePacket$0(ServerSessionPacketHandler.java:211)
      at org.apache.activemq.artemis.core.protocol.core.ServerSessionPacketHandler$$Lambda$847/166882454.run(Unknown Source)
      at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$ExecutorTask.run(OrderedExecutorFactory.java:122)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)

      Heap dump analisys points to

      private final ConcurrentMap<SimpleString, PagingStore> stores = new ConcurrentHashMap<>();
      

      in PagingManagerImpl class

              rhn-support-jbertram Justin Bertram
              rhn-support-toross Tom Ross
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: