[ https://issues.apache.org/activemq/browse/AMQ-2918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ashwini kuntamukkala updated AMQ-2918: -------------------------------------- As this test continued to run, I see that the consumer stopped pulling messages off the queue I see the producer is hammering messages into the queue but the Name ↑ Number Of Pending Messages Number Of Consumers Messages Enqueued Messages DLQ.incoming.queue 23150 0 23150 0 incoming.queue 4945 1 28094 23150 Now, please see that #messages enqueued and yet to be dequeued are 4945 while DLQ has all the 23150 messages that errorred out. This is not a good situation to have the broker getting stalled. ---- configuration info ---- <systemUsage> <systemUsage sendFailIfNoSpace="true"> <memoryUsage> <memoryUsage limit="256 mb"/> </memoryUsage> <storeUsage> <storeUsage limit="1 gb"/> </storeUsage> <tempUsage> <tempUsage limit="100 mb"/> </tempUsage> </systemUsage> </systemUsage> ------ using fileQueueCursor. > 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.