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

  • slow speed sending message

    Hi,

    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 t@86170
    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(WireFormatNegotiator.java:97)
    at org.apache.activemq.transport.MutexTransport.onewa y(MutexTransport.java:40)
    - locked <143da33> (a java.lang.Object)
    at org.apache.activemq.transport.ResponseCorrelator.a syncRequest(ResponseCorrelator.java:81)
    at org.apache.activemq.transport.ResponseCorrelator.r equest(ResponseCorrelator.java:86)
    at org.apache.activemq.ActiveMQConnection.syncSendPac ket(ActiveMQConnection.java:1262)
    at org.apache.activemq.ActiveMQConnection.ensureConne ctionInfoSent(ActiveMQConnection.java:1368)
    - locked <101f5e5> (a java.lang.Object)
    at org.apache.activemq.ActiveMQConnection.createSessi on(ActiveMQConnection.java:303)
    at org.springframework.jms.connection.SingleConnectio nFactory.createSession(SingleConnectionFactory.jav a:406)
    at org.springframework.jms.connection.CachingConnecti onFactory.getSession(CachingConnectionFactory.java :225)
    at org.springframework.jms.connection.SingleConnectio nFactory$SharedConnectionInvocationHandler.invoke( SingleConnectionFactory.java:534)
    at $Proxy109.createSession(Unknown Source)
    at org.springframework.jms.support.JmsAccessor.create Session(JmsAccessor.java:196)
    at org.springframework.jms.core.JmsTemplate.execute(J msTemplate.java:457)
    at org.springframework.jms.core.JmsTemplate.send(JmsT emplate.java:534)

    Here's the activemq setup (excerpt)

    <broker useJmx="false" xmlns="http://activemq.apache.org/schema/core" persistent="false">
    <transportConnectors>
    <transportConnector uri="${simulate.jms.url}"/>
    </transportConnectors>

    </broker>

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


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

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

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

    <bean id="destination" class="org.apache.activemq.command.ActiveMQQueue"
    autowire="constructor">
    <constructor-arg>
    <value>com.forio.simulate.jms.outgoing.queue</value>
    </constructor-arg>
    </bean>


    WILL

  • #2
    Will

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

    Comment


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

      http://static.springsource.org/sprin...onFactory.html

      Comment


      • #4
        Thanks! It's more subtle than that-- I'm using CachingConnectionFactory. More details on the repost in the JMS forum - http://forum.springsource.org/showth...ending-message

        Comment

        Working...
        X