activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Mielke <tors...@fusesource.com>
Subject Re: OutOfMemory in messageConsumer thread: activemq running out of memory
Date Fri, 09 Dec 2011 17:15:33 GMT
> Starting from the OutOfMemoryError, the message consumers
> don't consume any message anymore

Once you reach an OutOfMemoryError in your JVM you should not assume that anything continues
to work. After an OOM all side effects and errors can occur.
You will need to restart the JVM.


> Is there some way to reduce the time the topic waits for the message
> consumers to actually consume their messages?


You could configure a message limit strategy (e.g. constantPendingMessageLimitStrategy) so
that the broker discards old messages once a configurable limit has been reached. However
these msgs will then be lost. 
See http://activemq.apache.org/slow-consumer-handling.html

The main question is why do you run out of memory. Did you configure for system wide and destination
wide memory limits? Did you assign an overall JVM heap memory (-Xmx) to the broker that is
at least 30% higher than the configured memoryUsage limit?


You may also want to look at the ActiveMQ tuning guide [1] from FuseSource.

[1] http://fusesource.com/docs/broker/5.5/tuning/front.html


Regards,


Torsten Mielke
torsten@fusesource.com
tmielke@blogspot.com


On Dec 9, 2011, at 12:05 PM, jp wrote:

> Hi Torsten
> 
> Thanks a lot for your answer.
> 
> Even though I hadn't seen it, it  doesn't really help me: indeed, it's not
> the message consumers themselves who run out of memory, but the thread in
> which they run. Starting from the OutOfMemoryError, the message consumers
> don't consume any message anymore, while the topic looks like keeping these
> messages (for the consumer to consume them at some point in the future).
> 
> Is there some way to reduce the time the topic waits for the message
> consumers to actually consume their messages?
> 
> The only option I can think of currently may be to reduce the time to live
> of the messages, however we also have a durable topic subscriber for which
> the messages have to stay around longer, and as such we can't reduce to
> lower than the current value.
> 
> best
> joseph
> 






Mime
View raw message