You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Fred Crable <fr...@hotmail.com> on 2007/10/10 22:01:09 UTC

reconnection to unavailable broker causing thread/memory leak

I just setup my 1st broker network so I'm far from an expert.  However, while
I was testing I took down one broker and went to a meeting.  When I got back
and starting testing again I saw that there were out of memory errors. 
Looking at Jconsole after I restarted it looks like the number of threads is
growing by about a dozen or more after every failed reconnection.  This
accounts for the memory leak because of all the threads.

I'm posting to see if this is an old issue or a new introduced issue as I'm
running the top of head from 5.0 build 20071008.215641-19.  I don't think
I've got this configured wrong as I've got the most simple 2 broker
configuration configured like this:

<networkConnector name="terrell_duplex"
uri="static://(tcp://192.168.24.200:61616)"/>

Has anyone else seen this?

Thanks,
Fred
-- 
View this message in context: http://www.nabble.com/reconnection-to-unavailable-broker-causing-thread-memory-leak-tf4603206s2354.html#a13143554
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: reconnection to unavailable broker causing thread/memory leak

Posted by wlam <wl...@oatsystems.com>.
JIRA AMQ-1202 was marked as resolved on 5.0.0. But the downloaded src does
not show the changes mentioned by Kevin, i.e. comment out code on onStarted
and onStopped methods.  Wonder it is fixed another way or it didn't make it
to 5.0.0?  I need to patch it to 4.1.1 for the memory leak, can you point me
to the changes, thanks.  Is 4.2 mentioned by Kevin available?

- William Lam


rajdavies wrote:
> 
> Hi Fred,
> 
> Roger is referring to an Iona built apache licensed  productisation  
> of ActiveMQ - http://open.iona.com/products/fuse-message-broker/
> This is not an apache release of ActiveMQ - which as you rightly  
> point out can be found here: http://people.apache.org/repo/m2- 
> snapshot-repository/org/apache/activemq/apache-activemq/5.0-SNAPSHOT/.
> This mailing list should be for the discussion of Apache ActiveMQ only.
> 
> thanks,
> 
> Rob
> 
> 

-- 
View this message in context: http://www.nabble.com/reconnection-to-unavailable-broker-causing-thread-memory-leak-tp13143554s2354p15561399.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: reconnection to unavailable broker causing thread/memory leak

Posted by wlam <wl...@oatsystems.com>.
JIRA AMQ-1202 was marked as resolved on 5.0.0. But the downloaded src does
not show the changes mentioned by Kevin, i.e. comment out code on onStarted
and onStopped methods.  Wonder it is fixed another way or it didn't make it
to 5.0.0?  I need to patch it to 4.1.1 for the memory leak, can you point me
to the changes, thanks.  Is 4.2 mentioned by Kevin available?

- William Lam


rajdavies wrote:
> 
> Hi Fred,
> 
> Roger is referring to an Iona built apache licensed  productisation  
> of ActiveMQ - http://open.iona.com/products/fuse-message-broker/
> This is not an apache release of ActiveMQ - which as you rightly  
> point out can be found here: http://people.apache.org/repo/m2- 
> snapshot-repository/org/apache/activemq/apache-activemq/5.0-SNAPSHOT/.
> This mailing list should be for the discussion of Apache ActiveMQ only.
> 
> thanks,
> 
> Rob
> 
> 

-- 
View this message in context: http://www.nabble.com/reconnection-to-unavailable-broker-causing-thread-memory-leak-tp13143554s2354p15561399.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: reconnection to unavailable broker causing thread/memory leak

Posted by Rob Davies <ra...@gmail.com>.
Hi Fred,

Roger is referring to an Iona built apache licensed  productisation  
of ActiveMQ - http://open.iona.com/products/fuse-message-broker/
This is not an apache release of ActiveMQ - which as you rightly  
point out can be found here: http://people.apache.org/repo/m2- 
snapshot-repository/org/apache/activemq/apache-activemq/5.0-SNAPSHOT/.
This mailing list should be for the discussion of Apache ActiveMQ only.

thanks,

Rob

On Oct 23, 2007, at 3:29 AM, Fred Crable wrote:

>
> Whate is 5.0.0.4-fuse??  All of the snapshot builds are by date.
> Thanks,
> Fred
>
> Roger Bryant wrote:
>>
>> Apparently this issue has been resolved in 5.0.0.4-fuse.
>>
>> Regards,
>>
>> Roger
>>
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/reconnection-to- 
> unavailable-broker-causing-thread-memory-leak- 
> tf4603206s2354.html#a13356427
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: reconnection to unavailable broker causing thread/memory leak

Posted by Fred Crable <fr...@hotmail.com>.
Whate is 5.0.0.4-fuse??  All of the snapshot builds are by date.
Thanks,
Fred

Roger Bryant wrote:
> 
> Apparently this issue has been resolved in 5.0.0.4-fuse.
> 
> Regards,
> 
> Roger
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/reconnection-to-unavailable-broker-causing-thread-memory-leak-tf4603206s2354.html#a13356427
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: reconnection to unavailable broker causing thread/memory leak

Posted by Roger Bryant <ro...@yahoo.co.uk>.
Apparently this issue has been resolved in 5.0.0.4-fuse.

Regards,

Roger



-- 
View this message in context: http://www.nabble.com/reconnection-to-unavailable-broker-causing-thread-memory-leak-tf4603206s2354.html#a13298013
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: reconnection to unavailable broker causing thread/memory leak

Posted by nkiesel <nk...@tbdnetworks.com>.
Another  bug related to this could be AMQ-1214.  I see the same problem with
a simple pair of brokers connected using a static NetworkConnector. When the
receiving AQ server is down, the sender does the following every 5 seconds:

INFO  [NetworkConnector] Establishing network connection between from
vm://localhost?network=true to ssl://192.168.4.45:4081
WARN  [NetworkConnector] Could not start network bridge between:
vm://localhost?network=true and: ssl://192.168.4.45:4081 due to:
java.net.ConnectException: Connection refused

And it seems it leaks about 2 threads per minute in that state.

Any idea if and where that is fixed in 5.0?  I'd like to backport the fix if
possible as I can't upgrade to 5.0 at this point.

-- 
View this message in context: http://www.nabble.com/reconnection-to-unavailable-broker-causing-thread-memory-leak-tf4603206s2354.html#a13522716
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: reconnection to unavailable broker causing thread/memory leak

Posted by yaussy <ya...@cboe.com>.
A while back, with AMQ 4.2, which is now 5.0, I ran into a similar problem. 
I don't recall that there was a thread leak, but there was definitely a
memory leak.  Check out AMQ-1202.  Again, this may be different now with the
more recent 5.0.  I've not taken 5.0 yet, as I made a handful of changes to
4.2, making it pretty stable and we are now in production with it.

Kevin


Roger Bryant wrote:
> 
> Hi Fred,
> 
> We are experiencing the exact same problem here with ActiveMQ 5.0. We have
> had the Iona guys in over the last few weeks and it has been raised as a
> bug. I intend to follow up on it in the next few days and will keep you
> posted.
> 
> Rgds,
> 
> Roger
> 
> 

-- 
View this message in context: http://www.nabble.com/reconnection-to-unavailable-broker-causing-thread-memory-leak-tf4603206s2354.html#a13254130
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: reconnection to unavailable broker causing thread/memory leak

Posted by Roger Bryant <ro...@yahoo.co.uk>.
Hi Fred,

We are experiencing the exact same problem here with ActiveMQ 5.0. We have
had the Iona guys in over the last few weeks and it has been raised as a
bug. I intend to follow up on it in the next few days and will keep you
posted.

Rgds,

Roger

-- 
View this message in context: http://www.nabble.com/reconnection-to-unavailable-broker-causing-thread-memory-leak-tf4603206s2354.html#a13230140
Sent from the ActiveMQ - User mailing list archive at Nabble.com.