ActiveMQ connection leak

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ActiveMQ connection leak

rarun03
Hi,

We have a problem in some of our apps. The no. of connections to activemq keeps increasing.


in the image connection name ending with 70, 114 are the leaked connections. These connection remains until app is restarted and leaked connection keeps growing.


We are using following versions

activemq broker: 5.6
activemq client version: 5.5.0
camel version: 2.12.2(earlier 2.7 which also had same issue)
Below are the configuration.

<bean id="jmsPooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory"
                destroy-method="stop">
                <property name="maxConnections" value="8" />
                <property name="maximumActive" value="500" />
                <property name="connectionFactory">
                        <bean class="org.apache.activemq.ActiveMQConnectionFactory">
                                <property name="brokerURL" value="failover:(tcp://localhost:61616,tcp://localhost:61617)" />
                                <property name="closeTimeout" value="10" />
                                <property name="clientIDPrefix" value="any1"/>
                        </bean>
                </property>
        </bean>

        <bean id="jmsConfig" class="org.apache.camel.component.jms.JmsConfiguration">
                <property name="connectionFactory" ref="jmsPooledConnectionFactory" />
                <property name="asyncConsumer" value="true" />
                <property name="concurrentConsumers" value="1" />
        </bean>

        <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
                <property name="configuration" ref="jmsConfig" />
        </bean>


Help is much appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ connection leak

ceposta
If you can reproduce this, send it over, attach it to a JIRA.
Otherwise, you might some additional debugging you need to do on your
side... like what rogue consumers are opening up connections and leaving
them open.


On Tue, Jun 10, 2014 at 4:04 AM, rarun03 <[hidden email]>
wrote:

> Hi,
>
> We have a problem in some of our apps. The no. of connections to activemq
> keeps increasing.
> <http://activemq.2283324.n4.nabble.com/file/n4681943/Capture.png>
>
>
> in the image connection name ending with 70, 114 are the leaked
> connections.
> These connection remains until app is restarted and leaked connection keeps
> growing.
>
>
> We are using following versions
>
> activemq broker: 5.6
> activemq client version: 5.5.0
> camel version: 2.12.2(earlier 2.7 which also had same issue)
> Below are the configuration.
>
> <bean id="jmsPooledConnectionFactory"
> class="org.apache.activemq.pool.PooledConnectionFactory"
>                 destroy-method="stop">
>                 <property name="maxConnections" value="8" />
>                 <property name="maximumActive" value="500" />
>                 <property name="connectionFactory">
>                         <bean
> class="org.apache.activemq.ActiveMQConnectionFactory">
>                                 <property name="brokerURL"
> value="failover:(tcp://localhost:61616,tcp://localhost:61617)" />
>                                 <property name="closeTimeout" value="10" />
>                                 <property name="clientIDPrefix"
> value="any1"/>
>                         </bean>
>                 </property>
>         </bean>
>
>         <bean id="jmsConfig"
> class="org.apache.camel.component.jms.JmsConfiguration">
>                 <property name="connectionFactory"
> ref="jmsPooledConnectionFactory" />
>                 <property name="asyncConsumer" value="true" />
>                 <property name="concurrentConsumers" value="1" />
>         </bean>
>
>         <bean id="activemq"
> class="org.apache.activemq.camel.component.ActiveMQComponent">
>                 <property name="configuration" ref="jmsConfig" />
>         </bean>
>
>
> Help is much appreciated.
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-connection-leak-tp4681943.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



--
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ connection leak

rarun03
Thanks for your reply. Do you have any idea why connections keep changing. My guess is because of idletimeout 30s. But in another application with similar config the connections doesn't change.
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ connection leak

ceposta
Usually means a client is churning through connections when they don't need
to.



On Tue, Jun 10, 2014 at 7:22 AM, rarun03 <[hidden email]>
wrote:

> Thanks for your reply. Do you have any idea why connections keep changing.
> My
> guess is because of idletimeout 30s. But in another application with
> similar
> config the connections doesn't change.
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-connection-leak-tp4681943p4681960.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



--
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta