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
    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).

    Comment

    Working...
    X