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

    I would suggest to post this question on JMS forums and ActiveMQ forum and/or mailing lists. This forum is for Spring Integration project


    • #3
      From the provided stack trace it seems like operation to create/get JMS session is taking time. Try using the CachingConnectionFactory.


      • #4
        Thanks! It's more subtle than that-- I'm using CachingConnectionFactory. More details on the repost in the JMS forum -