You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by activemqny <ni...@yahoo.com> on 2008/10/07 23:04:09 UTC

Nework of brokers and Topic leak memory

We  use a network of brokers and topic to do messaging. All our message
producers and consumers talk to the local VM broker. We reply on bridges
between network of brokers to move messages between brokers. 

I attached two files to show this memory leak problem. TryJmsClient keeps
sending persistent messages to a Topic. TryJmsManager has a message
consumer. Start TryJmsManager first and then start TryJmsClient. After
running about 10 seconds, TryJmsClient stops sending because of getting
"SystemUsage memory limit reached" error. About 24K messages are sent and
consumer shows it get all messages. Now examine ActiveMQ MemoryUsage
printout of TryJmsClient, MemoryUsage percentage stays at 100% or 99%
forever. Producer can never send any more messages.

Note1: If I slow down sending by adding a sleep, I don't see memory leak
immediately. I am not sure for longer running time.
Note2: If I use Queue instead of Topic, there is no memory leak.

http://www.nabble.com/file/p19867244/TryJmsManager.java TryJmsManager.java 
http://www.nabble.com/file/p19867244/TryJmsClient.java TryJmsClient.java 
-- 
View this message in context: http://www.nabble.com/Nework-of-brokers-and-Topic-leak-memory-tp19867244p19867244.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Nework of brokers and Topic leak memory

Posted by Bruce Snyder <br...@gmail.com>.
On Tue, Oct 7, 2008 at 5:03 PM, activemqny <ni...@yahoo.com> wrote:
>
> Can you explain why after ALL messages have been delivered to consumer,
> memory usage stays at 100%?

I do notice that every thread in the TryJmsClient does not close any
of the resources it creates (i.e., connection, session and producer).

> How do I disabled producer flow throw API call?

This is set on a per-destination basis via a call to
Destination.setProducerFlowControl().

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/

Blog: http://bruceblog.org/

Re: Nework of brokers and Topic leak memory

Posted by activemqny <ni...@yahoo.com>.
Can you explain why after ALL messages have been delivered to consumer,
memory usage stays at 100%?

How do I disabled producer flow throw API call?

Thanks,

-Neal


bsnyder wrote:
> 
> On Tue, Oct 7, 2008 at 3:04 PM, activemqny <ni...@yahoo.com> wrote:
>>
>> We  use a network of brokers and topic to do messaging. All our message
>> producers and consumers talk to the local VM broker. We reply on bridges
>> between network of brokers to move messages between brokers.
>>
>> I attached two files to show this memory leak problem. TryJmsClient keeps
>> sending persistent messages to a Topic. TryJmsManager has a message
>> consumer. Start TryJmsManager first and then start TryJmsClient. After
>> running about 10 seconds, TryJmsClient stops sending because of getting
>> "SystemUsage memory limit reached" error. About 24K messages are sent and
>> consumer shows it get all messages. Now examine ActiveMQ MemoryUsage
>> printout of TryJmsClient, MemoryUsage percentage stays at 100% or 99%
>> forever. Producer can never send any more messages.
>>
>> Note1: If I slow down sending by adding a sleep, I don't see memory leak
>> immediately. I am not sure for longer running time.
>> Note2: If I use Queue instead of Topic, there is no memory leak.
> 
> This is not a memory leak, it's directly related to the way that
> producer flow control works:
> 
> http://activemq.apache.org/producer-flow-control.html
> 
> Try disabling producer flow control in conf/activemq.xml to see if
> that takes care of the issue.
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
> 
> Apache ActiveMQ - http://activemq.org/
> Apache Camel - http://activemq.org/camel/
> Apache ServiceMix - http://servicemix.org/
> 
> Blog: http://bruceblog.org/
> 
> 

-- 
View this message in context: http://www.nabble.com/ActiveMQ-5.1%3A-Nework-of-brokers-and-Topic-leak-memory-tp19867244p19869186.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Nework of brokers and Topic leak memory

Posted by Bruce Snyder <br...@gmail.com>.
On Tue, Oct 7, 2008 at 3:04 PM, activemqny <ni...@yahoo.com> wrote:
>
> We  use a network of brokers and topic to do messaging. All our message
> producers and consumers talk to the local VM broker. We reply on bridges
> between network of brokers to move messages between brokers.
>
> I attached two files to show this memory leak problem. TryJmsClient keeps
> sending persistent messages to a Topic. TryJmsManager has a message
> consumer. Start TryJmsManager first and then start TryJmsClient. After
> running about 10 seconds, TryJmsClient stops sending because of getting
> "SystemUsage memory limit reached" error. About 24K messages are sent and
> consumer shows it get all messages. Now examine ActiveMQ MemoryUsage
> printout of TryJmsClient, MemoryUsage percentage stays at 100% or 99%
> forever. Producer can never send any more messages.
>
> Note1: If I slow down sending by adding a sleep, I don't see memory leak
> immediately. I am not sure for longer running time.
> Note2: If I use Queue instead of Topic, there is no memory leak.

This is not a memory leak, it's directly related to the way that
producer flow control works:

http://activemq.apache.org/producer-flow-control.html

Try disabling producer flow control in conf/activemq.xml to see if
that takes care of the issue.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/

Blog: http://bruceblog.org/