Announcement Announcement Module
No announcement yet.
slow speed sending message Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • slow speed sending message


    I have an web application which is experiencing slowdowns when sending a message. (see stack trace below). It runs fine after a reboot. But after 1-2 weeks of running, I am seeing 10+ seconds delay when sending the message. When my server is under load this can be much longer.

    Any suggestions as to what I should look for? What might be accumulating in the running app that slows it down? The memory is not significantly high. I took a heap dump, didn't see anything unusual.

    Here's the stack trace. I took one a couple of times and it's always waiting at the same point.

    "TP-Processor33" - Thread [email protected]
    java.lang.Thread.State: TIMED_WAITING
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for <decc76> (a java.util.concurrent.CountDownLatch$Sync)
    at java.util.concurrent.locks.LockSupport.parkNanos(U nknown Source)
    at java.util.concurrent.locks.AbstractQueuedSynchroni zer.doAcquireSharedNanos(Unknown Source)
    at java.util.concurrent.locks.AbstractQueuedSynchroni zer.tryAcquireSharedNanos(Unknown Source)
    at java.util.concurrent.CountDownLatch.await(Unknown Source)
    at org.apache.activemq.transport. .oneway(
    at org.apache.activemq.transport.MutexTransport.onewa y(
    - locked <143da33> (a java.lang.Object)
    at org.apache.activemq.transport.ResponseCorrelator.a syncRequest(
    at org.apache.activemq.transport.ResponseCorrelator.r equest(
    at org.apache.activemq.ActiveMQConnection.syncSendPac ket(
    at org.apache.activemq.ActiveMQConnection.ensureConne ctionInfoSent(
    - locked <101f5e5> (a java.lang.Object)
    at org.apache.activemq.ActiveMQConnection.createSessi on(
    at org.springframework.jms.connection.SingleConnectio nFactory.createSession(SingleConnectionFactory.jav a:406)
    at org.springframework.jms.connection.CachingConnecti onFactory.getSession( :225)
    at org.springframework.jms.connection.SingleConnectio nFactory$SharedConnectionInvocationHandler.invoke(
    at $Proxy109.createSession(Unknown Source)
    at Session(
    at org.springframework.jms.core.JmsTemplate.execute(J
    at org.springframework.jms.core.JmsTemplate.send(JmsT

    Here's the activemq setup (excerpt)

    <broker useJmx="false" xmlns="" persistent="false">
    <transportConnector uri="${simulate.jms.url}"/>


    <bean id="jmsFactory" class="org.apache.activemq.ActiveMQConnectionFacto ry">
    <property name="brokerURL" value="${jms.url}" />

    <bean id="producerJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
    <property name="connectionFactory">

    class="org.springframework.jms.connection.CachingC onnectionFactory">
    <property name="targetConnectionFactory">
    <ref local="jmsFactory" />
    <property name="sessionCacheSize" value="100" />

    <bean id="simulationMessageSender" class="com.forio.simulate.jms.SimulationMessageSen derImpl">
    <ref bean="producerJmsTemplate" />

    <bean id="destination" class="org.apache.activemq.command.ActiveMQQueue"


  • #2
    This is a repost (mistakenly posted on the Integration forum).

    A user there suggested I should use CachingConnectionFactory. I am, with a sessionCacheSize of 100. What's weird is that this occurs when the system is not under load. Could the connections somehow not be freed up? I'm using Spring's JMSTemplate, so I'd assumed this would be handled correctly.

    (Is there a way to check this with my heap dump).