You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by rarun03 <ar...@thehutgroup.com> on 2014/06/10 13:04:50 UTC

ActiveMQ connection leak

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.

Re: ActiveMQ connection leak

Posted by Christian Posta <ch...@gmail.com>.
Usually means a client is churning through connections when they don't need
to.



On Tue, Jun 10, 2014 at 7:22 AM, rarun03 <ar...@thehutgroup.com>
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

Re: ActiveMQ connection leak

Posted by rarun03 <ar...@thehutgroup.com>.
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.

Re: ActiveMQ connection leak

Posted by Christian Posta <ch...@gmail.com>.
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 <ar...@thehutgroup.com>
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