I would say that this configuration is going to take a ton of tuning. You might actually see better performance by storing those 20-50MB blobs in an external system like S3 or a key/value store and then just enqueing a reference to them.
Remember the JVM memory usage isn’t as straight forward ad you would think, especially with in-VM data structures. In fact I think AMQ could benefit from some off-heap work to keep queue data off heap. On Mon, Feb 23, 2015 at 1:48 PM, kdillon <[email protected]> wrote: > 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. > -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile <https://plus.google.com/102718274791889610666/posts> <http://spinn3r.com>
