activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lei <>
Subject broker hung (out of memory) with multiple durable queues
Date Thu, 17 Feb 2011 01:23:49 GMT

I'm doing some testing on 5.4.2 broker with persistent on and
jdbcPersistenceAdapter to an Oracle DB. On the client side, I am using the
provided producer under apache-activemq-5.4.2/example, and the problem comes
when i have multiple producers running against the broker with settings of
durable queue (topic='false') and with each producer with a different queue
name. No consumer was running at the same time.

The broker seems to be hanging because of out of memory, as in the
activemq.log, there are logs as following right before the producers are
blocked and the broker became hanging.

2011-02-16 10:38:21,969 | DEBUG | Main:memory: usage change from: 99% of
available memory, to: 100% of available memory |
org.apache.activemq.usage.Usage | ActiveMQ Transport:

Worth of noticing is: this never happens when there is only one queue
against the broker even with multiple producers, i.e., all the producers
(multiple or single) have the same queue name and produce to the same queue.
I tested with very large number of messages.

I also tried to tune the memory usage of each queue by adding the
<destinationPolicy> related settings in the activemq.xml. But seems these
settings somehow conflict with the jdbcPersistenceAdapter piece. Once I add
the block for <destinationPolicy>, I can't start the broker successfully
anymore, while if I change the jdbcPersistenceAdapter to kahaDB settings,
the broker is all fine with the same <destinationPolicy> settings.

So here is the <destinationPolicy> settings I tried in the activemq.xml:
                <policyEntry topic=">" producerFlowControl="true"
                    <vmCursor />
                <policyEntry queue=">" producerFlowControl="true"
                  <!-- Use VM cursor for better latency
                       For more information, see:



And this is my jdbcPersistenceAdapter settings in the activemq.xml:
<broker xmlns="" brokerName="sglJDBC"
persistent="true" destroyApplicationContextOnStop="true"

       <jdbcPersistenceAdapter dataDirectory="${activemq.base}/data"
dataSource="#oracle-ds" createTablesOnStartup="false" useDatabaseLock="true"
                <statements tablePrefix="lh_"/>

Anybody has any idea?


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message