Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6721A10121 for ; Sun, 13 Oct 2013 13:27:13 +0000 (UTC) Received: (qmail 90415 invoked by uid 500); 13 Oct 2013 13:27:10 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 90387 invoked by uid 500); 13 Oct 2013 13:27:05 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Delivered-To: moderator for users@camel.apache.org Received: (qmail 10090 invoked by uid 99); 13 Oct 2013 11:37:30 -0000 X-ASF-Spam-Status: No, hits=1.3 required=5.0 tests=SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Date: Sun, 13 Oct 2013 04:37:01 -0700 (PDT) From: Arnaud Marchand To: users@camel.apache.org Message-ID: <1381664221049-5741468.post@n5.nabble.com> Subject: Camel Javascript Leak MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, 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 pom.xml 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: * * 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: http://camel.465427.n5.nabble.com/Camel-Javascript-Leak-tp5741468.html Sent from the Camel - Users mailing list archive at Nabble.com.