[ 
https://issues.apache.org/jira/browse/CAMEL-10146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15381859#comment-15381859
 ] 

Stefano Rocca commented on CAMEL-10146:
---------------------------------------

Hi Claus,
I confirm that the bug affects also the latest release.
The workaround is the same: including camel-groovy the problem disappears.
If you want to check, just search the number of instances of 
CompilerConfiguration with and without camel-groovy. With camel-groovy I always 
get one instance, without camel-groovy I get one instance for each <groovy> tag 
in the routes (i.e. just after the initialization of the routes) and then one 
for each time an exchange is processed by a <groovy> tag.

> Groovy language in route and no camel-groovy leads to memory leaks
> ------------------------------------------------------------------
>
>                 Key: CAMEL-10146
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10146
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.15.5, 2.17.2
>            Reporter: Stefano Rocca
>
> Consider this simple route:
> <route id="leak">
>       <from uri="file:///c:/temp/leak/in?move=.done&amp;moveFailed=.error"/>
>       <setHeader headerName="dummy"><groovy>"dummy" + 
> System.currentTimeMillis()</groovy></setHeader>
>       <to uri="file:///c:/temp/leak/out"/>
> </route>
> each time I put a file in c:/temp/leak/in, the number of instances of 
> org.codehaus.groovy.control.CompilerConfiguration increases by one.
> Since each CompilerConfiguration, because of this other issue GROOVY-7884, is 
> created anew and contains a BufferedWriter which in turn contains two buffers 
> of 8192 elements (one char[8192] and one byte[8192]), the heap is soon 
> consumed by useless buffers...
> Including camel-groovy in the dependencies the problem disappears.



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

Reply via email to