You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Andres (JIRA)" <ji...@apache.org> on 2009/06/29 11:24:07 UTC

[jira] Created: (CAMEL-1771) recipientList leaks memory

recipientList leaks memory
--------------------------

                 Key: CAMEL-1771
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1771
             Project: Apache Camel
          Issue Type: Bug
    Affects Versions: 1.6.1, 1.6.0
            Reporter: Andres


I found that RecipientList leaks memory .
The problem is that RecipientList stores endpoints in producerCache and cache key computed by using getEndpointUri. If endpoint uris are unique ( as we have ) then every new entry will stored in cache and will never released.

In example we are using recipientList  to send messages to the external http server, every url contains unique query parameters therefor every recipientList entry will create new producer ant that producer will stored in producerCache.
In our system recipientList wlil leak about 20M per day

Unfortunately I was unable to find any workaround 


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


[jira] Commented: (CAMEL-1771) recipientList leaks memory

Posted by "Andres (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52540#action_52540 ] 

Andres commented on CAMEL-1771:
-------------------------------

Tnx Claus
is it possible to use one of the concurrent API for LRUcache to get ride of  syncronization in ProducerCache.getProducer ?

> recipientList leaks memory
> --------------------------
>
>                 Key: CAMEL-1771
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1771
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.6.0, 1.6.1
>            Reporter: Andres
>            Assignee: Claus Ibsen
>
> I found that RecipientList leaks memory .
> The problem is that RecipientList stores endpoints in producerCache and cache key computed by using getEndpointUri. If endpoint uris are unique ( as we have ) then every new entry will stored in cache and will never released.
> In example we are using recipientList  to send messages to the external http server, every url contains unique query parameters therefor every recipientList entry will create new producer ant that producer will stored in producerCache.
> In our system recipientList wlil leak about 20M per day
> Unfortunately I was unable to find any workaround 

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


[jira] Commented: (CAMEL-1771) ProducerCache should be limited to not eat memory (was: recipientList leaks memory)

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52558#action_52558 ] 

Claus Ibsen commented on CAMEL-1771:
------------------------------------

I actually think we should not *store* the endpoints that have lenient properties, such as *http*. Then we wont store them in the CamelContext.

So if you need such an endpoint its created on demand when you call the {{getEndpoint(uri)}} method.
So when you do as you have millions http endpoints that are different it wont be added to Camel and also not in JMX.

In the future we could add the first in JMX to have a single entry there so we later can track number of invocations to this endpoint and more.
But all the JMX stuff is slated for an overhaul in 2.1

> ProducerCache should be limited to not eat memory (was: recipientList leaks memory)
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1771
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1771
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.4.0, 1.5.0, 1.6.0, 1.6.1, 2.0-M2
>            Reporter: Andres
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.6.2, 2.0.0
>
>
> I found that RecipientList leaks memory .
> The problem is that RecipientList stores endpoints in producerCache and cache key computed by using getEndpointUri. If endpoint uris are unique ( as we have ) then every new entry will stored in cache and will never released.
> In example we are using recipientList  to send messages to the external http server, every url contains unique query parameters therefor every recipientList entry will create new producer ant that producer will stored in producerCache.
> In our system recipientList wlil leak about 20M per day
> Unfortunately I was unable to find any workaround 

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


[jira] Commented: (CAMEL-1771) ProducerCache should be limited to not eat memory (was: recipientList leaks memory)

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52571#action_52571 ] 

Claus Ibsen commented on CAMEL-1771:
------------------------------------

Yeah we need the cache when people send to the same endpoint again and again.

ProducerCache if for caching *producers*
CamelContext caches *endpoints*

So we need both.

> ProducerCache should be limited to not eat memory (was: recipientList leaks memory)
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1771
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1771
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.4.0, 1.5.0, 1.6.0, 1.6.1, 2.0-M2
>            Reporter: Andres
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.6.2, 2.0.0
>
>
> I found that RecipientList leaks memory .
> The problem is that RecipientList stores endpoints in producerCache and cache key computed by using getEndpointUri. If endpoint uris are unique ( as we have ) then every new entry will stored in cache and will never released.
> In example we are using recipientList  to send messages to the external http server, every url contains unique query parameters therefor every recipientList entry will create new producer ant that producer will stored in producerCache.
> In our system recipientList wlil leak about 20M per day
> Unfortunately I was unable to find any workaround 

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


[jira] Commented: (CAMEL-1771) ProducerCache should be limited to not eat memory (was: recipientList leaks memory)

Posted by "Andres (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52583#action_52583 ] 

Andres commented on CAMEL-1771:
-------------------------------


 I tested 789598 and no more memory leaks - supercool :)
I hope  1.6.2 will realeased soon so that we can switch our pdoduction also to 1.6.2

thank you Claus 




> ProducerCache should be limited to not eat memory (was: recipientList leaks memory)
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1771
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1771
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.4.0, 1.5.0, 1.6.0, 1.6.1, 2.0-M2
>            Reporter: Andres
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.6.2, 2.0.0
>
>
> I found that RecipientList leaks memory .
> The problem is that RecipientList stores endpoints in producerCache and cache key computed by using getEndpointUri. If endpoint uris are unique ( as we have ) then every new entry will stored in cache and will never released.
> In example we are using recipientList  to send messages to the external http server, every url contains unique query parameters therefor every recipientList entry will create new producer ant that producer will stored in producerCache.
> In our system recipientList wlil leak about 20M per day
> Unfortunately I was unable to find any workaround 

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


[jira] Updated: (CAMEL-1771) ProducerCache should be limited to not eat memory (was: recipientList leaks memory)

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-1771:
-------------------------------

             Priority: Critical  (was: Major)
    Affects Version/s: 1.4.0
                       1.5.0
                       2.0-M2
        Fix Version/s: 2.0.0
                       1.6.2
              Summary: ProducerCache should be limited to not eat memory (was: recipientList leaks memory)  (was: recipientList leaks memory)

> ProducerCache should be limited to not eat memory (was: recipientList leaks memory)
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1771
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1771
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.4.0, 1.5.0, 1.6.0, 1.6.1, 2.0-M2
>            Reporter: Andres
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.6.2, 2.0.0
>
>
> I found that RecipientList leaks memory .
> The problem is that RecipientList stores endpoints in producerCache and cache key computed by using getEndpointUri. If endpoint uris are unique ( as we have ) then every new entry will stored in cache and will never released.
> In example we are using recipientList  to send messages to the external http server, every url contains unique query parameters therefor every recipientList entry will create new producer ant that producer will stored in producerCache.
> In our system recipientList wlil leak about 20M per day
> Unfortunately I was unable to find any workaround 

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


[jira] Updated: (CAMEL-1771) ProducerCache should be limited to not eat memory (was: recipientList leaks memory)

Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hadrian Zbarcea updated CAMEL-1771:
-----------------------------------

    Fix Version/s:     (was: 2.0.0)
                   2.0-M3

> ProducerCache should be limited to not eat memory (was: recipientList leaks memory)
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1771
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1771
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.4.0, 1.5.0, 1.6.0, 1.6.1, 2.0-M2
>            Reporter: Andres
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.6.2, 2.0-M3
>
>
> I found that RecipientList leaks memory .
> The problem is that RecipientList stores endpoints in producerCache and cache key computed by using getEndpointUri. If endpoint uris are unique ( as we have ) then every new entry will stored in cache and will never released.
> In example we are using recipientList  to send messages to the external http server, every url contains unique query parameters therefor every recipientList entry will create new producer ant that producer will stored in producerCache.
> In our system recipientList wlil leak about 20M per day
> Unfortunately I was unable to find any workaround 

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


[jira] Assigned: (CAMEL-1771) recipientList leaks memory

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-1771:
----------------------------------

    Assignee: Claus Ibsen

> recipientList leaks memory
> --------------------------
>
>                 Key: CAMEL-1771
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1771
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.6.0, 1.6.1
>            Reporter: Andres
>            Assignee: Claus Ibsen
>
> I found that RecipientList leaks memory .
> The problem is that RecipientList stores endpoints in producerCache and cache key computed by using getEndpointUri. If endpoint uris are unique ( as we have ) then every new entry will stored in cache and will never released.
> In example we are using recipientList  to send messages to the external http server, every url contains unique query parameters therefor every recipientList entry will create new producer ant that producer will stored in producerCache.
> In our system recipientList wlil leak about 20M per day
> Unfortunately I was unable to find any workaround 

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


[jira] Resolved: (CAMEL-1771) ProducerCache should be limited to not eat memory (was: recipientList leaks memory)

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-1771.
--------------------------------

    Resolution: Fixed

trunk: 789593.
1.x: 789598.

Andres can you try again with latest code? I have fixed this and also the JMX issue as well, so Camel will not register all the http endpoints.
So you do *not* need your own custom naming strategy anymore.

The fix is for both 1.6.2 and 2.0

> ProducerCache should be limited to not eat memory (was: recipientList leaks memory)
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1771
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1771
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.4.0, 1.5.0, 1.6.0, 1.6.1, 2.0-M2
>            Reporter: Andres
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.6.2, 2.0.0
>
>
> I found that RecipientList leaks memory .
> The problem is that RecipientList stores endpoints in producerCache and cache key computed by using getEndpointUri. If endpoint uris are unique ( as we have ) then every new entry will stored in cache and will never released.
> In example we are using recipientList  to send messages to the external http server, every url contains unique query parameters therefor every recipientList entry will create new producer ant that producer will stored in producerCache.
> In our system recipientList wlil leak about 20M per day
> Unfortunately I was unable to find any workaround 

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


[jira] Commented: (CAMEL-1771) ProducerCache should be limited to not eat memory (was: recipientList leaks memory)

Posted by "Andres (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52556#action_52556 ] 

Andres commented on CAMEL-1771:
-------------------------------

much better now however there is still some leak. I'm not 100% sure but seemst that DefaultCamelContext.getEndpoints adds unique endpoints to the endpoints hashmap ( like in ProducerCache )

Only thing I will see is that there is lot of Hasmap entrys containing HttpEndpoints  and the count of HttpEndpoints  growing and  this hasmap is inside SpringCamelContext ( DefaultCamelContext ). If it helps I will provide memory snapshot in yourkit format

> ProducerCache should be limited to not eat memory (was: recipientList leaks memory)
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1771
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1771
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.4.0, 1.5.0, 1.6.0, 1.6.1, 2.0-M2
>            Reporter: Andres
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.6.2, 2.0.0
>
>
> I found that RecipientList leaks memory .
> The problem is that RecipientList stores endpoints in producerCache and cache key computed by using getEndpointUri. If endpoint uris are unique ( as we have ) then every new entry will stored in cache and will never released.
> In example we are using recipientList  to send messages to the external http server, every url contains unique query parameters therefor every recipientList entry will create new producer ant that producer will stored in producerCache.
> In our system recipientList wlil leak about 20M per day
> Unfortunately I was unable to find any workaround 

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


[jira] Commented: (CAMEL-1771) recipientList leaks memory

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52538#action_52538 ] 

Claus Ibsen commented on CAMEL-1771:
------------------------------------

Ah cool with your finding. 

I will fix the ProducerCache to be size limited so it wont grow forever. Using a LRUCache instead of Map, with a default of 1000.


> recipientList leaks memory
> --------------------------
>
>                 Key: CAMEL-1771
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1771
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.6.0, 1.6.1
>            Reporter: Andres
>
> I found that RecipientList leaks memory .
> The problem is that RecipientList stores endpoints in producerCache and cache key computed by using getEndpointUri. If endpoint uris are unique ( as we have ) then every new entry will stored in cache and will never released.
> In example we are using recipientList  to send messages to the external http server, every url contains unique query parameters therefor every recipientList entry will create new producer ant that producer will stored in producerCache.
> In our system recipientList wlil leak about 20M per day
> Unfortunately I was unable to find any workaround 

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


[jira] Commented: (CAMEL-1771) ProducerCache should be limited to not eat memory (was: recipientList leaks memory)

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52569#action_52569 ] 

Claus Ibsen commented on CAMEL-1771:
------------------------------------

See nabble for discussion
http://www.nabble.com/-DISCUSS----Camel-2.0---About-Endpoints-with-lenient-properties--eating-to-much-memory-td24266319s22882.html

> ProducerCache should be limited to not eat memory (was: recipientList leaks memory)
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1771
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1771
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.4.0, 1.5.0, 1.6.0, 1.6.1, 2.0-M2
>            Reporter: Andres
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.6.2, 2.0.0
>
>
> I found that RecipientList leaks memory .
> The problem is that RecipientList stores endpoints in producerCache and cache key computed by using getEndpointUri. If endpoint uris are unique ( as we have ) then every new entry will stored in cache and will never released.
> In example we are using recipientList  to send messages to the external http server, every url contains unique query parameters therefor every recipientList entry will create new producer ant that producer will stored in producerCache.
> In our system recipientList wlil leak about 20M per day
> Unfortunately I was unable to find any workaround 

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


[jira] Commented: (CAMEL-1771) recipientList leaks memory

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52542#action_52542 ] 

Claus Ibsen commented on CAMEL-1771:
------------------------------------

trunk: 789285
1.x: 789287.

> recipientList leaks memory
> --------------------------
>
>                 Key: CAMEL-1771
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1771
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.4.0, 1.5.0, 1.6.0, 1.6.1, 2.0-M2
>            Reporter: Andres
>            Assignee: Claus Ibsen
>             Fix For: 1.6.2, 2.0.0
>
>
> I found that RecipientList leaks memory .
> The problem is that RecipientList stores endpoints in producerCache and cache key computed by using getEndpointUri. If endpoint uris are unique ( as we have ) then every new entry will stored in cache and will never released.
> In example we are using recipientList  to send messages to the external http server, every url contains unique query parameters therefor every recipientList entry will create new producer ant that producer will stored in producerCache.
> In our system recipientList wlil leak about 20M per day
> Unfortunately I was unable to find any workaround 

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


[jira] Commented: (CAMEL-1771) ProducerCache should be limited to not eat memory (was: recipientList leaks memory)

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52557#action_52557 ] 

Claus Ibsen commented on CAMEL-1771:
------------------------------------

Yeah CamelContext also holds a list of all endpoints created. I guess we should use a LRUCache as well to avoid high memory usages.

Another idea is to not add these endpoints to the CamelContext internal list at all as you will not re-use them later anyway.
But I am working on a patch for the JMX console right now. Only registering 1 endpoint for all the https.

> ProducerCache should be limited to not eat memory (was: recipientList leaks memory)
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1771
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1771
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.4.0, 1.5.0, 1.6.0, 1.6.1, 2.0-M2
>            Reporter: Andres
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.6.2, 2.0.0
>
>
> I found that RecipientList leaks memory .
> The problem is that RecipientList stores endpoints in producerCache and cache key computed by using getEndpointUri. If endpoint uris are unique ( as we have ) then every new entry will stored in cache and will never released.
> In example we are using recipientList  to send messages to the external http server, every url contains unique query parameters therefor every recipientList entry will create new producer ant that producer will stored in producerCache.
> In our system recipientList wlil leak about 20M per day
> Unfortunately I was unable to find any workaround 

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


[jira] Issue Comment Edited: (CAMEL-1771) ProducerCache should be limited to not eat memory (was: recipientList leaks memory)

Posted by "Andres (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52556#action_52556 ] 

Andres edited comment on CAMEL-1771 at 6/29/09 8:36 AM:
--------------------------------------------------------

much better now however there is still some leak. I'm not 100% sure but seemst that DefaultCamelContext.addEndpoint adds unique endpoints to the endpoints hashmap ( like in ProducerCache )

Only thing I will see is that there is lot of Hasmap entrys containing HttpEndpoints  and the count of HttpEndpoints  growing and  this hasmap is inside SpringCamelContext ( DefaultCamelContext ). If it helps I will provide memory snapshot in yourkit format

      was (Author: andres):
    much better now however there is still some leak. I'm not 100% sure but seemst that DefaultCamelContext.getEndpoints adds unique endpoints to the endpoints hashmap ( like in ProducerCache )

Only thing I will see is that there is lot of Hasmap entrys containing HttpEndpoints  and the count of HttpEndpoints  growing and  this hasmap is inside SpringCamelContext ( DefaultCamelContext ). If it helps I will provide memory snapshot in yourkit format
  
> ProducerCache should be limited to not eat memory (was: recipientList leaks memory)
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1771
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1771
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.4.0, 1.5.0, 1.6.0, 1.6.1, 2.0-M2
>            Reporter: Andres
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.6.2, 2.0.0
>
>
> I found that RecipientList leaks memory .
> The problem is that RecipientList stores endpoints in producerCache and cache key computed by using getEndpointUri. If endpoint uris are unique ( as we have ) then every new entry will stored in cache and will never released.
> In example we are using recipientList  to send messages to the external http server, every url contains unique query parameters therefor every recipientList entry will create new producer ant that producer will stored in producerCache.
> In our system recipientList wlil leak about 20M per day
> Unfortunately I was unable to find any workaround 

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


[jira] Commented: (CAMEL-1771) ProducerCache should be limited to not eat memory (was: recipientList leaks memory)

Posted by "Andres (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52570#action_52570 ] 

Andres commented on CAMEL-1771:
-------------------------------

Another thing I was wonderingi is that do we realy need ProducerCache in RecipientList ? Path to the camelContext seems relatively short  (allmost direct call to camelContext.getEndpoint(uri) ) and camelContext caches endpoints anyway

> ProducerCache should be limited to not eat memory (was: recipientList leaks memory)
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1771
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1771
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.4.0, 1.5.0, 1.6.0, 1.6.1, 2.0-M2
>            Reporter: Andres
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.6.2, 2.0.0
>
>
> I found that RecipientList leaks memory .
> The problem is that RecipientList stores endpoints in producerCache and cache key computed by using getEndpointUri. If endpoint uris are unique ( as we have ) then every new entry will stored in cache and will never released.
> In example we are using recipientList  to send messages to the external http server, every url contains unique query parameters therefor every recipientList entry will create new producer ant that producer will stored in producerCache.
> In our system recipientList wlil leak about 20M per day
> Unfortunately I was unable to find any workaround 

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


[jira] Commented: (CAMEL-1771) recipientList leaks memory

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52541#action_52541 ] 

Claus Ibsen commented on CAMEL-1771:
------------------------------------

Yeah I guess LRUCache was created before Java 5 really took off.

I am wondering thought if there is an implementation in Java 5 from the concurrency API that supports a Map like sorted on usage.

> recipientList leaks memory
> --------------------------
>
>                 Key: CAMEL-1771
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1771
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.6.0, 1.6.1
>            Reporter: Andres
>            Assignee: Claus Ibsen
>
> I found that RecipientList leaks memory .
> The problem is that RecipientList stores endpoints in producerCache and cache key computed by using getEndpointUri. If endpoint uris are unique ( as we have ) then every new entry will stored in cache and will never released.
> In example we are using recipientList  to send messages to the external http server, every url contains unique query parameters therefor every recipientList entry will create new producer ant that producer will stored in producerCache.
> In our system recipientList wlil leak about 20M per day
> Unfortunately I was unable to find any workaround 

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