You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2017/01/20 21:30:26 UTC

[jira] [Updated] (CAMEL-10732) Remove from all caches when Groovy script is removed from Camel script cache

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

Claus Ibsen updated CAMEL-10732:
--------------------------------
    Fix Version/s: 2.19.0
                   2.18.2
                   2.17.6

> Remove from all caches when Groovy script is removed from Camel script cache
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-10732
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10732
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-groovy
>    Affects Versions: 2.16.6, 2.17.4, 2.18.1
>            Reporter: Zoran Regvart
>            Assignee: Zoran Regvart
>             Fix For: 2.17.6, 2.18.2, 2.19.0
>
>
> Camel's GroovyLanguage maintains a cache of Groovy class scripts up to maximum of 1000 entries. When the limit of 1000 entries is reached the LRU cache removes the least used ones.
> The LRU cache removes only the Script classes it does not remove all the references that still remain to that class and this causes a memory leak.
> The remaining references are in Groovy metaclass registry, Groovy ClassInfo reflection support cache and Java Beans Introspector cache.
> All of these can be easily removed on removal from the Camel LRU script cache by invoking {{org.codehaus.groovy.runtime.InvokerHelper.removeClass}}.
> See [Groovy and Camel PermGen troubles with Java 1.7|http://mail-archives.apache.org/mod_mbox/camel-users/201701.mbox/%3C1484927208612-5792865.post%40n5.nabble.com%3E] on the camel-users mailing list.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)