activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Bertram <jbert...@apache.com>
Subject Re: Artemis 1.2 - possible mem leak in Management API (via JMS)
Date Mon, 09 May 2016 18:51:49 GMT
Can you provide a test-case which generates an OOME after numerous calls like this.  I've tried
and I can't.


Justin

----- Original Message -----
From: "Andrew Loucas" <andy.loucas@outlook.com>
To: users@activemq.apache.org
Sent: Thursday, May 5, 2016 4:02:43 AM
Subject: Artemis 1.2 - possible mem leak in Management API (via JMS)

Hi,I'm using Artemis 1.2.0 with an embedded broker and I'm following the documented code under
"Using Management Via JMS" so I have this to get the message count:
        try (            QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
       ) {            Queue managementQueue = ActiveMQJMSClient.createQueue("activemq.management");
           QueueRequestor requestor = new QueueRequestor(session, managementQueue);      
     Message message = session.createTextMessage();            JMSManagementHelper.putAttribute(message,
"jms.queue.exampleQueue", "messageCount");            Message reply = requestor.request(message);
           requestor.close();            return (int) (Integer) JMSManagementHelper.getResult(reply);
       } catch (Exception e) {            throw propagate(e);        }
After introducing this code I would eventually get an OOM in my app, profiling revealed certain
instances were going up each time it was called and never went down after GC, e.g.:
org.apache.activemq.artemis.utils.LinkedListImplorg.apache.activemq.artemis.utils.LinkedListImpl$Nodeorg.apache.activemq.artemis.utils.LinkedListImpl$Iterator
I do not see this behaviour with other code reading and writing to queues in my app. Let me
know if you need more details to investigate.
Thanks,Andy
 		 	   		  

Mime
View raw message