You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ChThelen <ch...@qaware.de> on 2017/01/25 08:46:21 UTC

PermGen Leak when using Groovy expressions

We use Camel 2.17.3 on a Tomcat 8.5.8 with Java 7. Our project has about 30
routes with a peak throughput of 2000 requests per minute in total.
In one route we used two Groovy expressions for message body transformation.
After the update to 2.17.3 we saw a constant growth of the perm gen usage -
~35 MB per day. Analysis of heap dumps and jmap -permstats showed that every
call to the route led to the creation of a Script<xxxx> class by the
GroovyClassLoader. The class definitions accumulated in the perm gen space
until it was full and the server got into trouble.

Removing the Groovy expressions solved the immediate problem, but I think
this should not be the final solution. ;-)

Would it be possible to cache the parsed script for each expression to avoid
the pile up of class definitions?

Regards

Christoph Thelen



--
View this message in context: http://camel.465427.n5.nabble.com/PermGen-Leak-when-using-Groovy-expressions-tp5793044.html
Sent from the Camel - Users mailing list archive at Nabble.com.

AW: PermGen Leak when using Groovy expressions

Posted by ChThelen <ch...@qaware.de>.
Hi Zoran,



thanks for your reply, the bug report/fix looks promising. I’ll verify that
it also applies to my problem when 2.17.6 is out.



Regards,



Christoph





*Von:* Zoran Regvart-2 [via Camel] [mailto:
ml-node+s465427n5793045h61@n5.nabble.com]
*Gesendet:* Mittwoch, 25. Januar 2017 11:00
*An:* ChThelen <ch...@qaware.de>
*Betreff:* Re: PermGen Leak when using Groovy expressions



Hi Christoph,
I think you have encountered a recently fixed issue[1]. You can help
us validate it by running your use case against 2.17.6-SNAPSHOT, you
can get the build from the snapshots repository[2]

thanks,

zoran

[1] https://issues.apache.org/jira/browse/CAMEL-10732
[2]
https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-groovy/2.17.6-SNAPSHOT/

On Wed, Jan 25, 2017 at 9:46 AM, ChThelen <[hidden email]
</user/SendEmail.jtp?type=node&node=5793045&i=0>> wrote:


> We use Camel 2.17.3 on a Tomcat 8.5.8 with Java 7. Our project has about
30
> routes with a peak throughput of 2000 requests per minute in total.
> In one route we used two Groovy expressions for message body
transformation.
> After the update to 2.17.3 we saw a constant growth of the perm gen usage
-
> ~35 MB per day. Analysis of heap dumps and jmap -permstats showed that
every
> call to the route led to the creation of a Script<xxxx> class by the
> GroovyClassLoader. The class definitions accumulated in the perm gen
space
> until it was full and the server got into trouble.
>
> Removing the Groovy expressions solved the immediate problem, but I think
> this should not be the final solution. ;-)
>
> Would it be possible to cache the parsed script for each expression to
avoid
> the pile up of class definitions?
>
> Regards
>
> Christoph Thelen
>
>
>
> --
> View this message in context:
http://camel.465427.n5.nabble.com/PermGen-Leak-when-using-Groovy-expressions-tp5793044.html
> Sent from the Camel - Users mailing list archive at Nabble.com.




-- 
Zoran Regvart

------------------------------

*If you reply to this email, your message will be added to the discussion
below:*

http://camel.465427.n5.nabble.com/PermGen-Leak-when-using-Groovy-expressions-tp5793044p5793045.html

To unsubscribe from PermGen Leak when using Groovy expressions, click here
<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5793044&code=Y2hyaXN0b3BoLnRoZWxlbkBxYXdhcmUuZGV8NTc5MzA0NHwxOTkwMDA5NzQ2>
.
NAML
<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://camel.465427.n5.nabble.com/PermGen-Leak-when-using-Groovy-expressions-tp5793044p5793172.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: PermGen Leak when using Groovy expressions

Posted by Zoran Regvart <zo...@regvart.com>.
Hi Christoph,
I think you have encountered a recently fixed issue[1]. You can help
us validate it by running your use case against 2.17.6-SNAPSHOT, you
can get the build from the snapshots repository[2]

thanks,

zoran

[1] https://issues.apache.org/jira/browse/CAMEL-10732
[2] https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-groovy/2.17.6-SNAPSHOT/

On Wed, Jan 25, 2017 at 9:46 AM, ChThelen <ch...@qaware.de> wrote:
> We use Camel 2.17.3 on a Tomcat 8.5.8 with Java 7. Our project has about 30
> routes with a peak throughput of 2000 requests per minute in total.
> In one route we used two Groovy expressions for message body transformation.
> After the update to 2.17.3 we saw a constant growth of the perm gen usage -
> ~35 MB per day. Analysis of heap dumps and jmap -permstats showed that every
> call to the route led to the creation of a Script<xxxx> class by the
> GroovyClassLoader. The class definitions accumulated in the perm gen space
> until it was full and the server got into trouble.
>
> Removing the Groovy expressions solved the immediate problem, but I think
> this should not be the final solution. ;-)
>
> Would it be possible to cache the parsed script for each expression to avoid
> the pile up of class definitions?
>
> Regards
>
> Christoph Thelen
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/PermGen-Leak-when-using-Groovy-expressions-tp5793044.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Zoran Regvart