Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10732

Remove from all caches when Groovy script is removed from Camel script cache

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.17.4, 2.18.1
    • Fix Version/s: 2.17.6, 2.18.2, 2.19.0
    • Component/s: camel-groovy
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Estimated Complexity:
      Unknown
    • Flags:
      Patch

      Description

      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 on the camel-users mailing list.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                zregvart Zoran Regvart
                Reporter:
                zregvart Zoran Regvart
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: