Hi, 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: tcp:///10.244.186.230:43107 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: <destinationPolicy> <policyMap> <policyEntries> <policyEntry topic=">" producerFlowControl="true" memoryLimit="1mb"> <pendingSubscriberPolicy> <vmCursor /> </pendingSubscriberPolicy> </policyEntry> <policyEntry queue=">" producerFlowControl="true" memoryLimit="2mb"> <!-- Use VM cursor for better latency For more information, see: http://activemq.apache.org/message-cursors.html <pendingQueuePolicy> <vmQueueCursor/> </pendingQueuePolicy> --> </policyEntry> </policyEntries> </policyMap> </destinationPolicy> And this is my jdbcPersistenceAdapter settings in the activemq.xml: <broker xmlns="http://activemq.apache.org/schema/core" brokerName="sglJDBC" persistent="true" destroyApplicationContextOnStop="true" deleteAllMessagesOnStartup="true"> <persistenceAdapter> <jdbcPersistenceAdapter dataDirectory="${activemq.base}/data" dataSource="#oracle-ds" createTablesOnStartup="false" useDatabaseLock="true" cleanupPeriod="7200000"> <statements> <statements tablePrefix="lh_"/> </statements> </jdbcPersistenceAdapter> </persistenceAdapter> Anybody has any idea? Thanks, Lei -- View this message in context: http://activemq.2283324.n4.nabble.com/broker-hung-out-of-memory-with-multiple-durable-queues-tp3310059p3310059.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.