activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juliano Carniel (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AMQ-1927) activemq producer hangs (using spring)
Date Sun, 14 Sep 2008 17:42:52 GMT

    [ https://issues.apache.org/activemq/browse/AMQ-1927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45683#action_45683
] 

Juliano Carniel commented on AMQ-1927:
--------------------------------------

I've tried adding your suggestion code to the queue policyEntry, like this:
 <policyEntry queue=">" producerFlowControl="false" memoryLimit="5mb"/>

It has worked. It was deadlocking at the producer and doesn't anymore.

Although it worked, now it's deadlocking at the Consumer, like the stack Trace shows below.
The problem is that, It keeps one processor core at 100%, very strange.

"listenerContainerQuickActivation-4" prio=10 tid=0x00002aaebc906800 nid=0x44d5 in Object.wait()
[0x0000000043cd6000..0x0000000043cd6c90]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00002aabb0190468> (a java.lang.Object)
	at org.apache.activemq.MessageDispatchChannel.dequeue(MessageDispatchChannel.java:77)
	- locked <0x00002aabb0190468> (a java.lang.Object)
	at org.apache.activemq.ActiveMQMessageConsumer.dequeue(ActiveMQMessageConsumer.java:409)
	at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:521)
	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveMessage(AbstractPollingMessageListenerContainer.java:375)
	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:300)
	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:254)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:870)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:810)
	at java.lang.Thread.run(Thread.java:619)

Thanks for any tip you could give.

> activemq producer hangs (using spring)
> --------------------------------------
>
>                 Key: AMQ-1927
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1927
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.1.0
>         Environment: suse linux 10.3
> sun jdk "1.6.0_06"
> tomcat 6.0.16
> spring framework 2.0
>            Reporter: Randy
>             Fix For: 5.3.0
>
>
> We have an internal activemq queue configured using the spring framework (configuration
below). During a high volume message test, the message producer hangs. See stack trace below.
> May be related to bugs #AMQ-1641 or #AMQ-1490.
> "pool-2-thread-2" prio=10 tid=0x00002aaaf2c20000 nid=0x297e waiting on condition [0x000000004173f000..0x000000004173fc20]
>    java.lang.Thread.State: WAITING (parking)
> 	at sun.misc.Unsafe.park(Native Method)
> 	- parking to wait for  <0x00002aaae859af40> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
> 	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
> 	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
> 	at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:317)
> 	at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> 	at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
> 	at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1195)
> 	at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1644)
> 	- locked <0x00002aaab3e433d8> (a java.lang.Object)
> 	at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:227)
> 	at org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:74)
> 	- locked <0x00002aaab3e42d08> (a org.apache.activemq.ActiveMQMessageProducer)
> 	at org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:59)
> 	at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:534)
> 	at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:511)
> 	at org.springframework.jms.core.JmsTemplate$2.doInJms(JmsTemplate.java:477)
> 	at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:428)
> 	at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:475)
> <amq:broker id="broker" useJmx="true" persistent="false"  brokerName="fb" >
> 	
>   		<amq:managementContext>
>         	<amq:managementContext connectorPort="2011" jmxDomainName="org.apache.activemq"/>
>         </amq:managementContext>
> 		<amq:transportConnectors>
> 			<amq:transportConnector uri="tcp://localhost:0" />
> 			<amq:transportConnector uri="tcp://localhost:61616" />
> 		</amq:transportConnectors>
> 	</amq:broker>
> 	<!--  ActiveMQ destinations to use  -->
> 	<amq:queue id="inboundEvents" physicalName="fb.inbound.events">
> 	</amq:queue>
>  
> 	<bean id="jmsFactory" class="org.apache.activemq.pool.PooledConnectionFactory">
> 		<property name="connectionFactory">
> 			<bean class="org.apache.activemq.ActiveMQConnectionFactory">
> 				<property name="brokerURL" value="vm://localhost"/>
> 			</bean>
> 		</property>
> 	</bean>
> 	<bean id="simpleJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
> 		<property name="connectionFactory" ref="jmsFactory"/>
> 	</bean>
> 	<!-- consumers -->
> 	<bean id="inboundEventConsumer" class="jms.WrapperConsumer" init-method="start" destroy-method="stop">
> 		<property name="myId" value="fb.consumer.events"/>
> 		<property name="template" ref="simpleJmsTemplate"/>
> 		<property name="destination" ref="inboundEvents"/>
> 	</bean>
> 	<!-- producers -->
> 	<bean id="inboundEventProducer" class="jms.WrapperProducer">
> 		<property name="template" ref="simpleJmsTemplate"/>
> 		<property name="destination" ref="inboundEvents"/>
> 	</bean>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message