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 58002107FF for ; Tue, 17 Dec 2013 12:30:29 +0000 (UTC) Received: (qmail 36094 invoked by uid 500); 17 Dec 2013 12:30:28 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 35813 invoked by uid 500); 17 Dec 2013 12:30:23 -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 35805 invoked by uid 99); 17 Dec 2013 12:30:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Dec 2013 12:30:23 +0000 X-ASF-Spam-Status: No, hits=0.3 required=5.0 tests=FREEMAIL_REPLY,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of willem.jiang@gmail.com designates 209.85.160.43 as permitted sender) Received: from [209.85.160.43] (HELO mail-pb0-f43.google.com) (209.85.160.43) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Dec 2013 12:30:15 +0000 Received: by mail-pb0-f43.google.com with SMTP id rq2so6866446pbb.16 for ; Tue, 17 Dec 2013 04:29:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :content-type:content-transfer-encoding:content-disposition; bh=nh7+j1hjcjdddOXuV01e2YEJV2DWnzE63ipQFJNME6g=; b=Wk3c2XOKYcn07/fR2Uh1w4IaXOl+hQ9IaLbC3Q5+1F3a9aCDn52PAtaOlH7DKgJW9k 0Ti3cv0+m6MjEhmsMH+1GRI3zJgpM/V+WICCIiselILAggO9dSTea+wh9n8qioYtiz/G +6Hhe0FN3NAQlitmQ7VAe3skeA577UoZpRi58ZaocJhNsv+TUWgWFTQUlDEe4O6lvqKz 2D9j5+LqCRPVRgecRg/wqaGqy+P8eiX7GfMw/ev490Eco1m7buZMn6kk98u/UdROCoAd PXBEOWakXkXRQFV/UoSFy1kJ/arVsX4GIN98XqzLBXL9HYmCQWdkafOjrcj9cJ+Ttb4g ZbkQ== X-Received: by 10.68.218.3 with SMTP id pc3mr27007086pbc.71.1387283394321; Tue, 17 Dec 2013 04:29:54 -0800 (PST) Received: from localhost ([123.115.72.133]) by mx.google.com with ESMTPSA id pl3sm33606846pbc.13.2013.12.17.04.29.51 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Dec 2013 04:29:53 -0800 (PST) Date: Tue, 17 Dec 2013 20:29:45 +0800 From: Willem Jiang To: users@camel.apache.org Message-ID: In-Reply-To: References: Subject: Re: Camel Cxf Failover causes leak memory on periodic http requests X-Mailer: Airmail (223) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org Hi, It not easy to upgrade the camel version in the service. You can using Main=5B1=5D or camel:run maven plugin=5B2=5D to start your = route. It could more easy to verify if the memory leak issue still there. =5B1=5Dhttp://camel.apache.org/running-camel-standalone-and-have-it-keep-= running.html =5B2=5Dhttp://camel.apache.org/camel-run-maven-goal.html -- =20 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 =20 Weibo: =E5=A7=9C=E5=AE=81willem On December 17, 2013 at 5:39:03 PM, LORENZA Adnan (adnan.lorenza=40gmail.= com) wrote: > =20 > Hi Willem, > =20 > Thanks for this quick answer. > My camel component is deployed on a jbi servicemix-fuse-3.5-00. =20 > If I upgrade my component to Camel 2.12 do you think that I can deploy = =20 > it > on servicemix 3.4 or servicemix-fuse-3.5-00 =3F > Thanks > =20 > =20 > =20 > On Tue, Dec 17, 2013 at 10:27 AM, Willem Jiang wrote: =20 > =20 > > Hi, > > Your camel version is quite old (it is about two years old), and =20 > we don=E2=80=99t > > provide community support for that version. > > Can you try to run the test with some latest released Camel =3F > > > > -- > > Willem Jiang > > > > Red Hat, Inc. > > Web: http://www.redhat.com > > Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com= /) =20 > > (English) > > http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese) =20 > > Twitter: willemjiang > > Weibo: =E5=A7=9C=E5=AE=81willem > > > > > > > > On December 17, 2013 at 5:03:01 PM, LORENZA Adnan (adnan.lorenza=40gm= ail.com) =20 > > wrote: > > > > > > Hi, > > > > > > I developed a camel cxf component that is configured to failover =20 > > > to > > > alternate addresses in case of connections /availability =20 > failures. > > > The camel component is a simple timer that sends every second =20 > > > a request to > > > a webservice. > > > > > > The camel route is the following : > > > > > > public void configure() throws Exception =7B > > > > > > > > > from(=22timer:timerRetrieveAvailableJobs=3FfixedRate=3Dtrue&period=3D= 1000=22) =20 > > > .setBody(constant(getRequestMessage()) > > > .setHeader(CxfConstants.OPERATION=5FNAME, > > > constant(=22getAvailableJobs=22)) > > > > > > > > .to(=22cxf:bean:cxfJobsWsEndpoint=3Fsynchronous=3Dtrue&logging=46eatu= reEnabled=3Dtrue=22); =20 > > > > > > =7D > > > > > > private String getRequestMessage()=7B > > > //Build the right request > > > ... > > > =7D > > > > > > The camel-context.xml configures the clustering failover =20 > > > as below : > > > ... > > > > serviceClass=3D=22net.jobs.ws.myPTServiceClass=22 address=3D=22 =20 > > > http://localhost/myservice/JobWS=22> > > > > > > > > > > > > > class=3D=22org.apache.cxf.clustering.SequentialStrategy=22> =20 > > > > > > > > > http://server1/JobWS > > > http://server2/JobWS > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ... > > > > > > After a few hours, a dump of JVM memory shows that some objects =20 > > > of CX=46 > > > (org.apage.cxf.xxxx) are created and remain in the memory. =20 > > > They are not > > > accessible by the GC. Their number continues to grow and causes =20 > > > a memory > > > leak after a long term : > > > > > > command : jmap -histo:live 25698 =7C grep cxf > > > 8: 90660 9428640 > > > =5BLorg.apache.cxf.phase.PhaseInterceptorChain=24InterceptorHolder;= =20 > > > 20: 135989 3263736 > > > org.apache.cxf.phase.PhaseInterceptorChain=24InterceptorHolder =20 > > > 22: 45328 2900992 org.apache.cxf.message.MessageImpl =20 > > > 24: 45330 2175840 > > > org.apache.cxf.phase.PhaseInterceptorChain > > > 25: 22664 1994432 org.apache.cxf.message.ExchangeImpl =20 > > > 33: 45328 1087872 > > > org.apache.cxf.phase.PhaseInterceptorChain=24PhaseInterceptorIterat= or =20 > > > 36: 22664 906560 > > > org.apache.cxf.clustering.=46ailoverTargetSelector=24InvocationCont= ext =20 > > > 40: 22664 725248 > > > org.apache.cxf.helpers.LoadingByteArrayOutputStream=241 =20 > > > 41: 45328 725248 org.apache.cxf.binding.soap.SoapMessage =20 > > > 46: 22664 543936 > > > org.apache.cxf.message.MessageContentsList > > > 51: 22664 362624 > > > org.apache.cxf.helpers.LoadingByteArrayOutputStream =20 > > > 52: 22664 362624 > > > org.apache.cxf.clustering.=46ailoverTargetSelector=24InvocationKey = =20 > > > > > > I tried the same test without failover configuration and I =20 > was > > > surprised : > > > the component continues to work without memory problem. The =20 > > > objects above > > > are collected and removed by the GC. > > > It seems that the classes that implement the clustering failover =20 > > > 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 =20 > > > 2.5 > > > > > > Any help will be appreciated. > > > Thanks > > > > > > Regards > > > Adnan > > > > > > > > =20