activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthrope>
Subject Broker Out of Memory
Date Thu, 07 Jun 2007 16:56:35 GMT

   I am sure people have dealt with this in the past, but I couldn't find
anything in prior posts that completely answered my question, so here it is:

   We are using ActiveMQ 4.1.1 with MySQL as the persistence store. We push
through messages that are typically 50k-100k in size, over persistent
queues. Sometimes, the number of messages in a particular broker can grow a
fair bit because the queues are not being drained. Today, we had a situation
where we shut down a broker that had roughly accumulated 1.2 million
messages on a queue. The broker restarted just fine, but had an out of
memory error when a client tried to connect (we have allotted the VM 2G of
memory). Is there a limit on the number of messages that can be resident in
persistent store before recovery is impossible? FWIW, we are not using a
UsageManager in our broker configuration.

   Having looked quite closely at the code, I am inclined to think that this
is because the broker invokes the recover() method on the JDBCMessageStore
class, which in turn tries to recover *all* the messages. If this hypothesis
is indeed correct, my question would be how this could be avoided.

Solving this is important to me not just for this particular issue, but also
due to the fact that I have written a SleepyCat BDB adaptor to ActiveMQ, and
would like to ensure that it is not susceptible to the same issue. I would
appreciate any advice/help on this issue.

Thanks much in advance,
Prashanth Nandavanam
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message