I'm currently deploying a Spring Application that uses ActiveMQ 5.10 in TomEE
1.7.1. I'm running into Java Heap exceptions when processing large
messages. Right now, all the Spring app does is read files from disk and
use the jmsTemplate to send to the queue. The files are ranging from
20-50MB and the JVM is given 2G of memory. The configuration for the Queue
and system usage is as follows.
<amq:policyEntry queue="files" producerFlowControl="false" queuePrefetch="1"
lazyDispatch="true" maxPageSize="1">
<amq:deadLetterStrategy>
<amq:individualDeadLetterStrategy queuePrefix="DLQ."
useQueueForQueueMessages="true"/>
</amq:deadLetterStrategy>
<amq:pendingQueuePolicy>
<amq:fileQueueCursor/>
</amq:pendingQueuePolicy>
</amq:policyEntry>
<amq:systemUsage>
<amq:systemUsage sendFailIfNoSpaceAfterTimeout="3000">
<amq:memoryUsage>
<amq:memoryUsage limit="512 mb" />
</amq:memoryUsage>
<amq:storeUsage>
<amq:storeUsage limit="100 gb" />
</amq:storeUsage>
<amq:tempUsage>
<amq:tempUsage limit="10 gb" />
</amq:tempUsage>
</amq:systemUsage>
</amq:systemUsage>
Using Eclipse's Memory Analyzer shows that the class,
org.apache.activemq.broker.region.Queue, uses 1,372,285,344 bytes. When I
increase the amount of memory to the JVM to 3G, the heap doesn't happen but
the heap saw tooths with a peak of 2.75G and trough is about 2.5G. Trying
to perform a GC in VisualVM doesn't seem to do anything.
I tried used BlobMessages but the session is proxied so I can't cast the
session to an ActiveMQ session.
Is there something I am missing to why this memory leak is occurring?
--
View this message in context:
http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-Memory-Leak-tp4691938.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.