You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by dmorcellet <dm...@free.fr> on 2009/04/05 18:37:22 UTC

Memory leak when using the JMS binding component in version 3.3

I think there is a memory retention problem in the JMS binding component.

Here is my test scenario.

I have a JMS provider service unit and a JMS consumer service unit linked
together.
I have a simple Java program that continuously sends text messages to a JMS
topic (managed by the servicemix embedded activemq server). My consumer
listens on this topic and sends the received message to the JMS provider.
I have another simple Java program that listens to another JMS topic (the
one the provider is writing to).
The consumer endpoint uses a in only MEP (in a first attempt, I used an
in/out MEP, but I rapidly realized that messages were accumulating inside
ther servicemix/activemq server).

I use 2 message sizes.
I'm using jconsole to monitor the memory consumption of servicemix (and the
state of my topics through JMX beans).
With short messages (20Kb xml text), I have a 200Mb memory retention after
sending about 1 million messages.
This week-end, I'm running another test with 1Mb XML messages (I will have a
result tomorrow morning). In that case, there are fewer messages that pass
through servicemix.

Using visualvm (to count instances), I found a map
(JMSComponent.knownExchanges) that contains roughtly as many entries as the
number of messages who did pass through servicemix. This map contains
message IDs.

I think the memory retention problem is proportional to the number of
messages exchanged. With bigger messages, the time to reach 200Mb memory
leak will be far longer than with 20Kb messages.

Thanks in advance for any answer / correction / patch / workaround.
Best regards,
Damien MORCELLET

PS : I'm @home and I do not have the source code for this test (xbean.xml
files, Maven projects and test Java emitter/receiver).

-- 
View this message in context: http://www.nabble.com/Memory-leak-when-using-the-JMS-binding-component-in-version-3.3-tp22895746p22895746.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Memory leak when using the JMS binding component in version 3.3

Posted by dmorcellet <dm...@free.fr>.
Hi Gert,

Thank you for you quick response.
I've just submitted an issue
(http://issues.apache.org/activemq/browse/SM-1842).

Best regards,
Damien

-- 
View this message in context: http://www.nabble.com/Memory-leak-when-using-the-JMS-binding-component-in-version-3.3-tp22895746p22949918.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Memory leak when using the JMS binding component in version 3.3

Posted by Gert Vanthienen <ge...@gmail.com>.
Damien,

The knownExchanges map should only contain the number of exchanges
that are currently pending in the ESB, so it should definitely not
contain the full list of exchanges that ever passed through it.

If that's what you're seeing, I'd invite you to raise a JIRA issue for
it.  It would be cool if you could attach the sample SA there as well.
 That will make it a lot easier to troubleshoot things.

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/4/6 dmorcellet <dm...@free.fr>:
>
> Hi,
>
> I don't think you're to blame :
> I'm using version 3.3 as downloaded from the download page of the site.
>
> Here are 2 archives :
> - my maven project for my SA and my 2 SUs,
> - Java source code for the JMS emitter and the JMS receiver. The main class
> is Main. The emitter receives "EMITTER" as argument, and the receiver
> receives "RECEIVER".
>
> http://www.nabble.com/file/p22904692/jms2jms.zip jms2jms.zip
> http://www.nabble.com/file/p22904692/src.zip src.zip
>
> best regards,
> Damien MORCELLET
>
> --
> View this message in context: http://www.nabble.com/Memory-leak-when-using-the-JMS-binding-component-in-version-3.3-tp22895746p22904692.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>

Re: Memory leak when using the JMS binding component in version 3.3

Posted by dmorcellet <dm...@free.fr>.
Hi,

I don't think you're to blame :
I'm using version 3.3 as downloaded from the download page of the site.

Here are 2 archives :
- my maven project for my SA and my 2 SUs,
- Java source code for the JMS emitter and the JMS receiver. The main class
is Main. The emitter receives "EMITTER" as argument, and the receiver
receives "RECEIVER".

http://www.nabble.com/file/p22904692/jms2jms.zip jms2jms.zip 
http://www.nabble.com/file/p22904692/src.zip src.zip 

best regards,
Damien MORCELLET

-- 
View this message in context: http://www.nabble.com/Memory-leak-when-using-the-JMS-binding-component-in-version-3.3-tp22895746p22904692.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Memory leak when using the JMS binding component in version 3.3

Posted by Chris Custine <ch...@gmail.com>.
Hi Damien,
Is there any chance that you built the JMS component from SVN this week?  I
introduced a bug that might have caused something like this and it was
exposed in SVN for a few days (its fixed as of Thursday or Friday).  If that
isn't the case, could you let us know exactly what version you are using and
possibly post some of your configuration?

Thanks,
Chris
--
Chris Custine
FUSESource :: http://fusesource.com
My Blog :: http://blog.organicelement.com
Apache ServiceMix :: http://servicemix.apache.org
Apache Directory Server :: http://directory.apache.org


On Sun, Apr 5, 2009 at 10:37 AM, dmorcellet <dm...@free.fr> wrote:

>
> I think there is a memory retention problem in the JMS binding component.
>
> Here is my test scenario.
>
> I have a JMS provider service unit and a JMS consumer service unit linked
> together.
> I have a simple Java program that continuously sends text messages to a JMS
> topic (managed by the servicemix embedded activemq server). My consumer
> listens on this topic and sends the received message to the JMS provider.
> I have another simple Java program that listens to another JMS topic (the
> one the provider is writing to).
> The consumer endpoint uses a in only MEP (in a first attempt, I used an
> in/out MEP, but I rapidly realized that messages were accumulating inside
> ther servicemix/activemq server).
>
> I use 2 message sizes.
> I'm using jconsole to monitor the memory consumption of servicemix (and the
> state of my topics through JMX beans).
> With short messages (20Kb xml text), I have a 200Mb memory retention after
> sending about 1 million messages.
> This week-end, I'm running another test with 1Mb XML messages (I will have
> a
> result tomorrow morning). In that case, there are fewer messages that pass
> through servicemix.
>
> Using visualvm (to count instances), I found a map
> (JMSComponent.knownExchanges) that contains roughtly as many entries as the
> number of messages who did pass through servicemix. This map contains
> message IDs.
>
> I think the memory retention problem is proportional to the number of
> messages exchanged. With bigger messages, the time to reach 200Mb memory
> leak will be far longer than with 20Kb messages.
>
> Thanks in advance for any answer / correction / patch / workaround.
> Best regards,
> Damien MORCELLET
>
> PS : I'm @home and I do not have the source code for this test (xbean.xml
> files, Maven projects and test Java emitter/receiver).
>
> --
> View this message in context:
> http://www.nabble.com/Memory-leak-when-using-the-JMS-binding-component-in-version-3.3-tp22895746p22895746.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>