activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Moquin" <fragility...@gmail.com>
Subject Re: ActiveMQ causes producer to hang when no consumer on topic after a few minutes.
Date Fri, 22 Aug 2008 03:43:32 GMT
Hi Bruce,

I tried my service with the two settings:

deliveryMode="1"
timeToLive="1000"

The scenario is an external JMS client sends a message to a JMS consumer SU
in servicemix.  It forwards that to my service which does some processing
with the incoming message, and then creates a new message that it sends to a
JMS provider SU.  I ran this using Servicemix 3.3.

I loaded up jconsole and watched my provider topic.  As soon as my Topic
size hit 1321, my service all of a sudden stopped receiving messages from my
external sender and went completely silent.  If I look at the topic that my
external sender, is sending to, it is still filling up with messages that
are no longer being received by my hanging service.  When my external sender
finished, I see that 1500 messages were enqueued and dequeued on my consumer
JMS SU, but only 1340 were enqueued on my provider JMS SU.

So, I did a stack dump on the JVM and noticed there are 35 hanging threads
that are all hanging trying to send a message to the JMS provider.  So
apparently, the:

<property name="useAsyncSend" value="true" />

is working and I just didn't notice that there were 35 hanging threads.  The
problem is, I guess once enough threads are tied up because the messages
can't be sent, then everything starts hanging.  I have the message time to
live sent to a 1000.  You said that it worked in 5.1, but it doesn't seem to
be working for me.  Is that value really in milliseconds?  Is there
something else I need?  The non persistent delivery mode obviously isn't
working either.  Do I have any options for preventing this situation from
happening?  I don't see any other options in the config I can try.

Here is the stack dump that is the same for all 35 threads:

"pool-component.servicemix-jms-thread-3" prio=6 tid=0x39a4b400 nid=0x2724
waiting on condition [0x3f58e000..0x3f58fb14]
   java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x1774ee48> (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:19
25)
        at
java.util.concurrent.ArrayBlockingQueue.put(ArrayBlockingQueue.java:252)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:663)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
        at
java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy.rejectedExecution(ThreadPoolExecutor.java:1737)
        at
java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767)
        at
java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:658)
        at
org.apache.servicemix.executors.impl.ExecutorImpl.execute(ExecutorImpl.java:43)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue.enqueue(SedaQueue.java:128)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.enqueuePacket(SedaFlow.java:183)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doSend(SedaFlow.java:163)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:123)
        at
org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:283)
        at
org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(SecuredBroker.java:88)
        at
org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:843)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:395)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:431)
        at
org.apache.servicemix.common.EndpointDeliveryChannel.send(EndpointDeliveryChannel.java:88)
        at
org.apache.servicemix.common.endpoints.SimpleEndpoint.send(SimpleEndpoint.java:67)
        at
org.apache.servicemix.common.endpoints.SimpleEndpoint.done(SimpleEndpoint.java:78)
        at
org.apache.servicemix.common.endpoints.ProviderEndpoint.process(ProviderEndpoint.java:101)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:597)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:548)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:502)
        at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
        at
java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy.rejectedExecution(ThreadPoolExecutor.java:1737)
        at
java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767)
        at
java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:658)
        at
org.apache.servicemix.executors.impl.ExecutorImpl.execute(ExecutorImpl.java:43)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue.enqueue(SedaQueue.java:128)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.enqueuePacket(SedaFlow.java:183)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doSend(SedaFlow.java:163)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:123)
        at
org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:283)
        at
org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(SecuredBroker.java:88)
        at
org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:843)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:395)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:431)
        at
org.apache.servicemix.client.DefaultServiceMixClient.send(DefaultServiceMixClient.java:147)
        at
org.apache.servicemix.client.DefaultServiceMixClient.send(DefaultServiceMixClient.java:211)

On Wed, Aug 20, 2008 at 11:39 PM, Ryan Moquin <fragility2.0@gmail.com>wrote:

> I should mention though that I did see settings for the new servicemix-jms
> endpoints actually that should solve the problems I'm having, but I don't
> think any of them work.  I'll try them again and let you know which ones and
> then you can tell me if I'm screwing up and using them wrong, though they
> aren't complicated so I can't imagine I'm using them wrong.
>
>
> On Wed, Aug 20, 2008 at 5:05 PM, Bruce Snyder <bruce.snyder@gmail.com>wrote:
>
>> On Wed, Aug 20, 2008 at 2:49 PM, Ryan Moquin <fragility2.0@gmail.com>
>> wrote:
>> > I don't think I saw that option?  I assumed the timetolive would have
>> that
>> > effect?  I'll take another look at the settings, I may have overlooked
>> that
>> > one.  I hope so because I'm getting pretty desperate and I'm positive
>> that
>> > I've correctly tried all the other options correctly, which is why I'm
>> so
>> > puzzled.
>>
>> OK, my mistake in suggesting the use of the expiration. I just tested
>> the expiration and the timeToLive on the JMS message in ActiveMQ 4.1.1
>> and 5.1. The expiration doesn't seem to have any affect on either
>> broker, but the timeToLive does. In ActiveMQ 4.1.1, the timeToLive
>> doesn't affect message expiration but in ActiveMQ 5.1, setting a
>> timeToLive will cause the message to be delivered to the DLQ if the
>> timeToLive surpasses and the message is still pending.
>>
>> Bruce
>> --
>> perl -e 'print
>> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
>> );'
>>
>> Apache ActiveMQ - http://activemq.org/
>> Apache Camel - http://activemq.org/camel/
>> Apache ServiceMix - http://servicemix.org/
>>
>> Blog: http://bruceblog.org/
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message