Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 17351 invoked from network); 8 Oct 2010 16:37:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Oct 2010 16:37:02 -0000 Received: (qmail 54372 invoked by uid 500); 8 Oct 2010 16:37:02 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 54256 invoked by uid 500); 8 Oct 2010 16:37:02 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 54248 invoked by uid 99); 8 Oct 2010 16:37:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Oct 2010 16:37:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Oct 2010 16:37:01 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o98GafY3023718 for ; Fri, 8 Oct 2010 16:36:41 GMT Message-ID: <5949366.51891286555801239.JavaMail.jira@thor> Date: Fri, 8 Oct 2010 12:36:41 -0400 (EDT) From: "Gary Tully (JIRA)" To: dev@activemq.apache.org Subject: [jira] Commented: (AMQ-2918) ActiveMQMapMessage stay in memory causing leaks In-Reply-To: <33076946.16501284495460381.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c [ https://issues.apache.org/activemq/browse/AMQ-2918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62466#action_62466 ] Gary Tully commented on AMQ-2918: --------------------------------- do you have a test case for the use of the file cursor, would be great if there was a reproducible junit test case. > ActiveMQMapMessage stay in memory causing leaks > ----------------------------------------------- > > Key: AMQ-2918 > URL: https://issues.apache.org/activemq/browse/AMQ-2918 > Project: ActiveMQ > Issue Type: Bug > Components: Broker > Affects Versions: 5.4.0 > Environment: Windows XP > Reporter: ashwini kuntamukkala > > I am running embedded broker in a spring container. During a volume test, I forward messages to a dead letter queue. ActiveMQMapMessage that are being redirected to dead letter queue stay in memory. So, if I forward 15000 messages to dead letter queue, all 15000 messages will be in memory. These are persistent messages. > I want to have a smaller memory footprint. Why are the activemqmapmessages staying in memory. the ones that were successfully processed get deleted just fine. > This is jmap -histo output > 14: 19826 3647984 org.apache.activemq.command.ActiveMQMapMessage > 28: 19791 791640 org.apache.activemq.command.ActiveMQQueue > total of 19K+ activeMqMapMessages and ActiveMQQueue instances... > Since these are dead letter messages, why does ActiveMQ need to hold references to these messages in memory?? > ---------------------------------- > I tried using the filequeuecursor: after a while the broker stopped responding because of the following error. > org.apache.activemq.broker.TransportConnection.Service.serviceException() 294 : Async error occurred: java.lang.RuntimeException: java.lang.NullPointerException > java.lang.RuntimeException: java.lang.NullPointerException > at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor.tryAddMessageLast(FilePendingMessageCursor.java:228) > at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor.addMessageLast(FilePendingMessageCursor.java:192) > at org.apache.activemq.broker.region.Queue.sendMessage(Queue.java:1601) > at org.apache.activemq.broker.region.Queue.doMessageSend(Queue.java:707) > at org.apache.activemq.broker.region.Queue.send(Queue.java:646) > at org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:365) > at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:494) > at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129) > at org.apache.activemq.broker.scheduler.SchedulerBroker.send(SchedulerBroker.java:136) > at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129) > at org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96) > at org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:230) > at org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135) > at org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:460) > at org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:663) > at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:309) > at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:185) > at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:116) > at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:69) > at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:218) > at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122) > at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43) > at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) > at java.lang.Thread.run(Unknown Source) > Caused by: java.lang.NullPointerException > at org.apache.activemq.store.kahadb.plist.PList.addLast(PList.java:176) > at org.apache.activemq.store.kahadb.plist.PList$2.execute(PList.java:163) > at org.apache.kahadb.page.Transaction.execute(Transaction.java:728) > at org.apache.activemq.store.kahadb.plist.PList.addLast(PList.java:161) > at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor.tryAddMessageLast(FilePendingMessageCursor.java:221) > ... 24 more -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.