Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 65320 invoked from network); 4 Feb 2011 15:25:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Feb 2011 15:25:31 -0000 Received: (qmail 38745 invoked by uid 500); 4 Feb 2011 15:25:30 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 38424 invoked by uid 500); 4 Feb 2011 15:25:29 -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 Received: (qmail 38415 invoked by uid 99); 4 Feb 2011 15:25:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Feb 2011 15:25:28 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.216.180 as permitted sender) Received: from [209.85.216.180] (HELO mail-qy0-f180.google.com) (209.85.216.180) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Feb 2011 15:25:22 +0000 Received: by qyk29 with SMTP id 29so1962744qyk.11 for ; Fri, 04 Feb 2011 07:25:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=EbHlW31N+AyJD1UqoBLfyh/eTzDHKSGpn3d53IPB/Jc=; b=vDUfL0JtxE5fuTiCkQn1OLB8SmgCmjXd59L1eR8HFHII+M+4MybaAA3qoQN5r1cLY2 Y7Ow6XV6BRG2NxBUcdm579dg7urGW0MnYlszUnjhXqK72+voA9JKRHi8cx0YxNnBPVYM LksGB0KB8NHzF0T7Hp4dOdfAtoJJhl+K6vL48= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=FIqPdORYQTDh7bgAAfDc0wNSY1wqjcfO93o1iLtCOb4eZ7MOUgZi/bKGGaMkz+BG3+ JBdYxCnZqXay6aKxCx3GsY4d7nFawd/YAjZveMYUaH9rHLMKsSbIZx4cwhg+iTpWND+C hjehFzeCN61j0R5ShAVvdWE3GuSs0aUVrE52s= Received: by 10.229.83.201 with SMTP id g9mr2853663qcl.33.1296832893582; Fri, 04 Feb 2011 07:21:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.238.4 with HTTP; Fri, 4 Feb 2011 07:06:37 -0800 (PST) In-Reply-To: <1296831638048-3371119.post@n5.nabble.com> References: <1296492432278-3364793.post@n5.nabble.com> <1296831638048-3371119.post@n5.nabble.com> From: Claus Ibsen Date: Fri, 4 Feb 2011 16:06:37 +0100 Message-ID: Subject: Re: Memory leak in camel mail component To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Feb 4, 2011 at 4:00 PM, Marco Crivellaro wrote: > > Hi All, > I am working together with Sri in a project which makes an extensive use of > camel (you've seen some posts from me in the past). > I can confirm the number of endpoints being created grows constantly using > any protocol, > with our system we are serving a very high number of endpoints and at the > moment we are forced to restart our application every now and then to free > up memory use. Is there a way to unreference all endpoints and therefore > allow them to be deallocated by garbage collector? > Are you using JMX? If so you can disable JMX then it ought to run. I think the problem is that endpoints gets enlisted in JMX and thus it grows. Camel itself just cache at most 1000 endpoints and thus it shouldn't be a big deal. That said I have though of only enlisting resources in JMX during starting a route. That ensures only "static" beans gets enlisted. Then all the dynamic endpoints and producers wont be enlisted. Although producers are not enlisted today. And many time you can put the "dynamic" parts of the endpoints as headers to the message. Frankly where it belong. Eg a To recipient in a mail message belongs as a message header, and not as an endpoint uri parameter. And keep the endpoint less dynamic. > I think the issue described by Sri with mail component is a different > problem as the leak is shown only when using recipient list, if we use a for > cicle the memory use is not growing (hence the same endpoint is used). > -- > View this message in context: http://camel.465427.n5.nabble.com/Memory-leak-in-camel-mail-component-tp3364793p3371119.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: cibsen@fusesource.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/