[jira] Created: (SM-1842) Memory leak when using the JMS binding component

View: New views
7 Messages — Rating Filter:   Alert me  

[jira] Created: (SM-1842) Memory leak when using the JMS binding component

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Memory leak when using the JMS binding component
------------------------------------------------

                 Key: SM-1842
                 URL: https://issues.apache.org/activemq/browse/SM-1842
             Project: ServiceMix
          Issue Type: Bug
          Components: servicemix-jms
    Affects Versions: 3.3
         Environment: Windows XP Pro
JDK 1.6.0_07
            Reporter: Damien MORCELLET
         Attachments: jms2jms.zip, src.zip

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.
Same problem with 1Mb messages (approximatively same memory retention and number of messages).

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.

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".


--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SM-1842) Memory leak when using the JMS binding component

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/activemq/browse/SM-1842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Damien MORCELLET updated SM-1842:
---------------------------------

    Attachment: src.zip
                jms2jms.zip

> Memory leak when using the JMS binding component
> ------------------------------------------------
>
>                 Key: SM-1842
>                 URL: https://issues.apache.org/activemq/browse/SM-1842
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-jms
>    Affects Versions: 3.3
>         Environment: Windows XP Pro
> JDK 1.6.0_07
>            Reporter: Damien MORCELLET
>         Attachments: jms2jms.zip, src.zip
>
>
> 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.
> Same problem with 1Mb messages (approximatively same memory retention and number of messages).
> 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.
> 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".

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1842) Memory leak when using the JMS binding component

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/activemq/browse/SM-1842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51105#action_51105 ]

Chris Custine commented on SM-1842:
-----------------------------------

Just out of curiosity, have you tried the new JMS component?
http://servicemix.apache.org/servicemix-jms-new-endpoints.html

Slightly different syntax for configuring the endpoints, but this is what we recommend for new projects.  I would just be curious if you have the same issues with this one.

> Memory leak when using the JMS binding component
> ------------------------------------------------
>
>                 Key: SM-1842
>                 URL: https://issues.apache.org/activemq/browse/SM-1842
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-jms
>    Affects Versions: 3.3
>         Environment: Windows XP Pro
> JDK 1.6.0_07
>            Reporter: Damien MORCELLET
>         Attachments: jms2jms.zip, src.zip
>
>
> 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.
> Same problem with 1Mb messages (approximatively same memory retention and number of messages).
> 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.
> 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".

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (SM-1842) Memory leak when using the JMS binding component

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/activemq/browse/SM-1842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Custine reassigned SM-1842:
---------------------------------

    Assignee: Chris Custine

> Memory leak when using the JMS binding component
> ------------------------------------------------
>
>                 Key: SM-1842
>                 URL: https://issues.apache.org/activemq/browse/SM-1842
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-jms
>    Affects Versions: 3.3
>         Environment: Windows XP Pro
> JDK 1.6.0_07
>            Reporter: Damien MORCELLET
>            Assignee: Chris Custine
>         Attachments: jms2jms.zip, src.zip
>
>
> 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.
> Same problem with 1Mb messages (approximatively same memory retention and number of messages).
> 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.
> 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".

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1842) Memory leak when using the JMS binding component

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/activemq/browse/SM-1842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52577#action_52577 ]

supertallal@... commented on SM-1842:
---------------------------------------------

Hi,
I"m using the newest version of servicemix (4) and I think I'm having the same problem of memory leak. I'd like to know if you solved it or if you found a way to bypass it.
Regards,
Tarek.

Quoted from:
http://www.nabble.com/-jira--Created%3A-%28SM-1842%29-Memory-leak-when-using-the-JMS-binding-component-tp22949795p22949795.html



> Memory leak when using the JMS binding component
> ------------------------------------------------
>
>                 Key: SM-1842
>                 URL: https://issues.apache.org/activemq/browse/SM-1842
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-jms
>    Affects Versions: 3.3
>         Environment: Windows XP Pro
> JDK 1.6.0_07
>            Reporter: Damien MORCELLET
>            Assignee: Chris Custine
>         Attachments: jms2jms.zip, src.zip
>
>
> 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.
> Same problem with 1Mb messages (approximatively same memory retention and number of messages).
> 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.
> 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".

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (SM-1842) Memory leak when using the JMS binding component

by dmorcellet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,
I didn't solved it.
I didnt find a way to bypass it.

I've tried to use the new servicemix-jms binding component (with ServiceMix 3.3), as Chris suggested. It does not show this memory leak problem but has some strange connection/deconnection problems.
I did not investiguate further (in the end, we decided to use a pure JMS solution with no ServiceMix, especially due to our required message volume/count).

If I use the same scenario with HTTP/SOAP binding components instead of JMS ones, the memory leak does not appear (millions of messages are OK).
Regards,
Damien.

JIRA jira@apache.org wrote:
Hi,
I"m using the newest version of servicemix (4) and I think I'm having the same problem of memory leak. I'd like to know if you solved it or if you found a way to bypass it.
Regards,
Tarek.

[jira] Commented: (SM-1842) Memory leak when using the JMS binding component

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/activemq/browse/SM-1842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52675#action_52675 ]

Damien MORCELLET commented on SM-1842:
--------------------------------------

Hi Tarek,

I didn't solved it.
I didnt find a way to bypass it.

I've tried to use the new servicemix-jms binding component (with ServiceMix 3.3), as Chris suggested. It does not show this memory leak problem but has some strange connection/deconnection problems.
I did not investiguate further (in the end, we decided to use a pure JMS solution with no ServiceMix, especially due to our required message volume/count).

If I use the same scenario with HTTP/SOAP binding components instead of JMS ones, the memory leak does not appear (millions of messages are OK).
Regards,
Damien.


> Memory leak when using the JMS binding component
> ------------------------------------------------
>
>                 Key: SM-1842
>                 URL: https://issues.apache.org/activemq/browse/SM-1842
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-jms
>    Affects Versions: 3.3
>         Environment: Windows XP Pro
> JDK 1.6.0_07
>            Reporter: Damien MORCELLET
>            Assignee: Chris Custine
>         Attachments: jms2jms.zip, src.zip
>
>
> 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.
> Same problem with 1Mb messages (approximatively same memory retention and number of messages).
> 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.
> 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".

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.