camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arnaud Marchand <>
Subject Camel Javascript Leak
Date Sun, 13 Oct 2013 11:37:01 GMT

I am experiencing a memory leak in the following conditions:

1) I Have a small application, built using Maven against the version 2.12.1
of camel. There is no trick to get a particular version of any library in my

2) I only use the spring xml DSL files

3) I use ActiveMQ as Broker

4) I use external javascript scripts in some of my routes

The problem occurs when I load a script via a resource as shown in the next

*<route id="TestLeak">
      <from uri="jms:topic:INMES"/>
      <to uri="log:RES"/>
      <to uri="jms:topic:OUTMES"/>

The problem occurs when the *contentCache* is set to false. In fact
everything works correctly in both cases (True or False) but if the cache is
not used, a memory leak appears (After a few thousands of messages if the
Java Memory Heap is set to 512MB). 

The problem should be easy to reproduce.

I did not check the code yet, but I suppose that the leak can be in the
resource management of the Rhino library used by Camel.

I agree that instantiating a script engine per message is highly
inefficient, but that is convenient during the test phases.

Thanks for your help,

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message