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 EA980102B0 for ; Tue, 17 Dec 2013 09:39:02 +0000 (UTC) Received: (qmail 50578 invoked by uid 500); 17 Dec 2013 09:39:00 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 50451 invoked by uid 500); 17 Dec 2013 09:39:00 -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 50145 invoked by uid 99); 17 Dec 2013 09:38:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Dec 2013 09:38:59 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of adnan.lorenza@gmail.com designates 209.85.216.196 as permitted sender) Received: from [209.85.216.196] (HELO mail-qc0-f196.google.com) (209.85.216.196) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Dec 2013 09:38:51 +0000 Received: by mail-qc0-f196.google.com with SMTP id r5so1756115qcx.3 for ; Tue, 17 Dec 2013 01:38:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=zk36sSJmzgli70IoYP2po4jHZLJVj0InL1m5buU0QGQ=; b=nBnXIWCDv7BkhEDxbfeEf7T8G6l+mUXkJ75bRkJCuQiDcqf5kd1xTLJdUiffUtM4Uy x6weEJl//RDugU5mYXvLYWXYquNlrwG54LniLvA3AYxbikFBFjX/vYWEMsIHhoY8J3aa 3PQCp5r/hrBqtO8nBqlucrF8NWyB2odAfTSUxuS9icbgxFSU1pv7AmORwXcrDk4bGNtV 9+ULNxam2Qsns6RCTUEQVqwmZ+s3ufiU1KiJ7AB1oaTB1lZPEnTSp3xTAsnBnGe5kynW phyxI3cpFjcYbxlLmMPOGsbmo/EdBNe8VEEIF5MYwVYKI+/yVfgHhBc8WlEtsmqBHq1s kfzQ== MIME-Version: 1.0 X-Received: by 10.224.168.13 with SMTP id s13mr40647405qay.18.1387273110425; Tue, 17 Dec 2013 01:38:30 -0800 (PST) Received: by 10.140.84.212 with HTTP; Tue, 17 Dec 2013 01:38:30 -0800 (PST) In-Reply-To: References: Date: Tue, 17 Dec 2013 10:38:30 +0100 Message-ID: Subject: Re: Camel Cxf Failover causes leak memory on periodic http requests From: LORENZA Adnan To: users@camel.apache.org Content-Type: multipart/alternative; boundary=089e01493b2af41f8304edb7b0a2 X-Virus-Checked: Checked by ClamAV on apache.org --089e01493b2af41f8304edb7b0a2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Willem, Thanks for this quick answer. My camel component is deployed on a jbi servicemix-fuse-3.5-00. If I upgrade my component to Camel 2.12 do you think that I can deploy it on servicemix 3.4 or servicemix-fuse-3.5-00 ? Thanks On Tue, Dec 17, 2013 at 10:27 AM, Willem Jiang wrot= e: > Hi, > Your camel version is quite old (it is about two years old), and we don= =E2=80=99t > provide community support for that version. > Can you try to run the test with some latest released Camel ? > > -- > Willem Jiang > > Red Hat, Inc. > Web: http://www.redhat.com > Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) > (English) > http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese) > Twitter: willemjiang > Weibo: =E5=A7=9C=E5=AE=81willem > > > > On December 17, 2013 at 5:03:01 PM, LORENZA Adnan (adnan.lorenza@gmail.co= m) > wrote: > > > > Hi, > > > > I developed a camel cxf component that is configured to failover > > to > > alternate addresses in case of connections /availability failures. > > The camel component is a simple timer that sends every second > > a request to > > a webservice. > > > > The camel route is the following : > > > > public void configure() throws Exception { > > > > > > from("timer:timerRetrieveAvailableJobs?fixedRate=3Dtrue&period=3D1000") > > .setBody(constant(getRequestMessage()) > > .setHeader(CxfConstants.OPERATION_NAME, > > constant("getAvailableJobs")) > > > > > .to("cxf:bean:cxfJobsWsEndpoint?synchronous=3Dtrue&loggingFeatureEnabled= =3Dtrue"); > > > > } > > > > private String getRequestMessage(){ > > //Build the right request > > ... > > } > > > > The camel-context.xml configures the clustering failover > > as below : > > ... > > > serviceClass=3D"net.jobs.ws.myPTServiceClass" address=3D" > > http://localhost/myservice/JobWS"> > > > > > > > > > class=3D"org.apache.cxf.clustering.SequentialStrategy"> > > > > > > http://server1/JobWS > > http://server2/JobWS > > > > > > > > > > > > > > > > > > > > > > ... > > > > After a few hours, a dump of JVM memory shows that some objects > > of CXF > > (org.apage.cxf.xxxx) are created and remain in the memory. > > They are not > > accessible by the GC. Their number continues to grow and causes > > a memory > > leak after a long term : > > > > command : jmap -histo:live 25698 | grep cxf > > 8: 90660 9428640 > > [Lorg.apache.cxf.phase.PhaseInterceptorChain$InterceptorHolder; > > 20: 135989 3263736 > > org.apache.cxf.phase.PhaseInterceptorChain$InterceptorHolder > > 22: 45328 2900992 org.apache.cxf.message.MessageImpl > > 24: 45330 2175840 > > org.apache.cxf.phase.PhaseInterceptorChain > > 25: 22664 1994432 org.apache.cxf.message.ExchangeImpl > > 33: 45328 1087872 > > org.apache.cxf.phase.PhaseInterceptorChain$PhaseInterceptorIterator > > 36: 22664 906560 > > org.apache.cxf.clustering.FailoverTargetSelector$InvocationContext > > 40: 22664 725248 > > org.apache.cxf.helpers.LoadingByteArrayOutputStream$1 > > 41: 45328 725248 org.apache.cxf.binding.soap.SoapMessage > > 46: 22664 543936 > > org.apache.cxf.message.MessageContentsList > > 51: 22664 362624 > > org.apache.cxf.helpers.LoadingByteArrayOutputStream > > 52: 22664 362624 > > org.apache.cxf.clustering.FailoverTargetSelector$InvocationKey > > > > I tried the same test without failover configuration and I was > > surprised : > > the component continues to work without memory problem. The > > objects above > > are collected and removed by the GC. > > It seems that the classes that implement the clustering failover > > retain > > created objects and prevent their removal. > > > > The test has been done on the following configurations : > > > > * apache-servicemix-3.4.0, cxf 2.4.4, camel 2.8.3 > > > > * apache-servicemix-3.5.0-fuse-00-00, cxf 2.2.11, camel > > 2.5 > > > > Any help will be appreciated. > > Thanks > > > > Regards > > Adnan > > > > --089e01493b2af41f8304edb7b0a2--