activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From victorbp <diabolik...@hotmail.com>
Subject ActiveMQ Blocked when memory is full
Date Mon, 06 Oct 2008 16:33:17 GMT

Hello!

I'm sending non persistent messages to queue and topics (non durable)
through ActiveMQ. I'm trying to use the spooling to disk when memory is full
but every time that I reach the memory limit, seems like the broker gets
blocked and I'm not able to send or receive more messages. 

I can see how the broker works fine with a large number of messages without
reach the limit of memory (I use JConsole to see the memory percentage
usage), but if I increase the number of messages and the memory reach 100%
usage, I just see that the memory doesn't decrease, remains at 100% even if
I wait long time, seems like the consumers get blocked and they dont read
the messages. 

I get this behaviour using VMCursors and FileCursors, the only difference is
that when I use FileCursors I can see some temp files created in the
tempDataStore directory. 

What I understand about spooling to disk is that when the memory limit is
reached, the next messages will be saved in disk until the messages in
memory are read, but instead I'm getting the system blocked.

Here is my config. Does anyone have an idea about what is happening or if I
am missing some extra config?

Thanks a lot!

<bean id="brokerService"
	class="org.apache.activemq.broker.BrokerService" init-method="start"
	destroy-method="stop">
	<property name="brokerName" value="localhost" />
	<property name="persistent" value="false" />
	<property name="useJmx" value="true" />
	<property name="managementContext">
	<bean
	class="org.apache.activemq.broker.jmx.ManagementContext">
		<property name="createMBeanServer" value="false" />
		<property name="createConnector" value="false" />
		<property name="findTigerMbeanServer" value="true" />
	</bean>
	</property>
	<property name="advisorySupport" value="false" />
	<property name="systemUsage">
		<bean class="org.apache.activemq.usage.SystemUsage">
		<property name="memoryUsage">
			<bean
			class="org.apache.activemq.usage.MemoryUsage">
			<property name="limit"
				value="200000" />
			</bean>
		</property>
		<property name="storeUsage">
		<bean class="org.apache.activemq.usage.StoreUsage">
			<property name="limit"
				value="100000000" />
		</bean>
		</property>
		<property name="tempUsage">
		<bean class="org.apache.activemq.usage.TempUsage">
			<property name="limit"
			             value="100000000" />
		</bean>
		</property>
		</bean>
	</property>
	<property name="transportConnectorURIs">
		<list>
			<value>${broker.url}</value>
		</list>
	</property>

	<property name="tempDataStore">
		<bean class="org.apache.activemq.kaha.impl.KahaStore">
			<constructor-arg>
				<bean class="java.io.File">
					<constructor-arg
						value="temp/" />
				</bean>
			</constructor-arg>
			<constructor-arg value="rw" />
		</bean>
	</property>
	<property name="destinationPolicy">
		<bean
		class="org.apache.activemq.broker.region.policy.PolicyMap">
		<property name="defaultEntry">
	<bean
	class="org.apache.activemq.broker.region.policy.PolicyEntry">
		<property name="subscriptionRecoveryPolicy">
		<bean
	            
class="org.apache.activemq.broker.region.policy.NoSubscriptionRecoveryPolicy">
		</bean>
		</property>
		<property name="messageEvictionStrategy">
		<bean
	
class="org.apache.activemq.broker.region.policy.OldestMessageEvictionStrategy">
		</bean>
		</property>
		<property name="pendingMessageLimitStrategy">
		<bean
	         
class="org.apache.activemq.broker.region.policy.ConstantPendingMessageLimitStrategy">
		</bean>
		</property>
		<property name="destination">
		<bean
		class="org.apache.activemq.command.ActiveMQTopic">
		<property name="physicalName"
			value="topic" />
		</bean>
		</property>
		<property name="pendingSubscriberPolicy">
		<bean
            
class="org.apache.activemq.broker.region.policy.FilePendingSubscriberMessageStoragePolicy">
	            </bean>
		</property>
		<property
		name="pendingDurableSubscriberPolicy">
		<bean

class="org.apache.activemq.broker.region.policy.FilePendingDurableSubscriberMessageStoragePolicy">
		</bean>
		</property>
		<property name="pendingQueuePolicy">
		<bean

class="org.apache.activemq.broker.region.policy.FilePendingQueueMessageStoragePolicy">
		</bean>
		</property>
		</bean>
	</property>
</bean>

-- 
View this message in context: http://www.nabble.com/ActiveMQ-Blocked-when-memory-is-full-tp19841470p19841470.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message