You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Timothy Bish (JIRA)" <ji...@apache.org> on 2011/06/30 00:26:28 UTC

[jira] [Closed] (AMQ-2918) ActiveMQMapMessage stay in memory causing leaks

     [ https://issues.apache.org/jira/browse/AMQ-2918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish closed AMQ-2918.
-----------------------------

    Resolution: Incomplete

No test case provided and I can't reproduce any leaks using the information given.

> ActiveMQMapMessage stay in memory causing leaks
> -----------------------------------------------
>
>                 Key: AMQ-2918
>                 URL: https://issues.apache.org/jira/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.
For more information on JIRA, see: http://www.atlassian.com/software/jira