You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Ben O'Day (JIRA)" <ji...@apache.org> on 2014/06/06 06:43:02 UTC

[jira] [Commented] (AMQ-5188) AMQ broker throws OutOfMemoryError even when global flow-control memoryUsage limit is imposed

    [ https://issues.apache.org/jira/browse/AMQ-5188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14019570#comment-14019570 ] 

Ben O'Day commented on AMQ-5188:
--------------------------------

we had a similar issue and were able to mitigate it by setting a per queue memory limit...that said, we have flow control disabled as well, so the scenario might be a bit different...

     <policyEntry queue=">" producerFlowControl="false" memoryLimit="100mb">

> AMQ broker throws OutOfMemoryError even when global flow-control memoryUsage limit is imposed
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-5188
>                 URL: https://issues.apache.org/jira/browse/AMQ-5188
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.8.0
>         Environment: AMQ 5.8.0 broker running on 64-bit Linux 
> AMQP Qpid (.26) JMS producers running on 64-bin Linux
>            Reporter: Michael Samson
>         Attachments: AMQ_heap1.png, AMQ_heap2.png, QpidProducerAMQOutOfMemory.java, activemq-5.10.xml, activemq.xml, qpid-producer.tar
>
>
> * 5.8.0 broker was configured with persistence=false and a global <memoryUsage limit="700 mb"/>
> * 5.8.0 broker JVM memory was set to default of 1G
> * No active consumers
> * 10 Qpid (version .26) AMQP producers sent messages to 10 broker queues until flow control was reached
> * Over time the AMQP connections/producers were closed and recreated and they reattempted to send messages.  As this cycle continues, eventually ActiveMQ threw OutOfMemoryErrors.
> I grabbed a heap dump and ActiveMQTextMessages consumed 874M of the heap.  Taking a closer look, it appears that each org.apache.activemq.broker.region.Queue's messagesWaitingForSpace map grows unbounded and causes the OutOfMemory.
> I will attach a sample maven program that reproduces the problem along with my activemq configuration, heap screenshots, etc.
> Are their any workarounds to this issue?  It is a use case for our customers if their queue consumers die for an extended period of time.
>  



--
This message was sent by Atlassian JIRA
(v6.2#6252)