Return-Path: X-Original-To: apmail-synapse-user-archive@www.apache.org Delivered-To: apmail-synapse-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9C77F71C8 for ; Fri, 20 May 2011 16:13:47 +0000 (UTC) Received: (qmail 69317 invoked by uid 500); 20 May 2011 16:13:47 -0000 Delivered-To: apmail-synapse-user-archive@synapse.apache.org Received: (qmail 69191 invoked by uid 500); 20 May 2011 16:13:46 -0000 Mailing-List: contact user-help@synapse.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@synapse.apache.org Delivered-To: mailing list user@synapse.apache.org Received: (qmail 69183 invoked by uid 99); 20 May 2011 16:13:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 May 2011 16:13:46 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [67.231.152.202] (HELO mx0b-000f9d01.pphosted.com) (67.231.152.202) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 May 2011 16:13:39 +0000 Received: from pps.filterd (m0001103 [127.0.0.1]) by mx0b-000f9d01.pphosted.com (8.14.4/8.14.4) with SMTP id p4KG8V8b028510 for ; Fri, 20 May 2011 09:13:17 -0700 Received: from denpxchedge2.jeppesen.com ([169.143.0.211]) by mx0b-000f9d01.pphosted.com with ESMTP id wdna11q96-1 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 20 May 2011 09:13:17 -0700 Received: from entdencas01.corp.gds.jeppesen.com (entdencas01.corp.gds.jeppesen.com [169.143.34.189]) by denpxchedge2.jeppesen.com (8.14.4/8.14.4) with ESMTP id p4KGDFJq021458 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for ; Fri, 20 May 2011 10:13:15 -0600 Received: from DENPXCHMBX01.corp.gds.jeppesen.com ([fe80:0000:0000:0000:7938:1a8d:114.196.228.114]) by entdencas01.corp.gds.jeppesen.com ([169.143.75.25]) with mapi; Fri, 20 May 2011 10:13:44 -0600 From: Abid Khan-EXT To: "user@synapse.apache.org" Date: Fri, 20 May 2011 10:13:42 -0600 Subject: RE: Please help: does Synapse leak memory? Thread-Topic: Please help: does Synapse leak memory? Thread-Index: AcwWrnrnaocAkxmhR5KgPphA43j4zwAWhFtw Message-ID: <83B2FA13648D5841982336487CE01FE01EB8BB18@DENPXCHMBX01.corp.gds.jeppesen.com> References: <83B2FA13648D5841982336487CE01FE01D6E4693@DENPXCHMBX01.corp.gds.jeppesen.com> <83B2FA13648D5841982336487CE01FE01D76A498@DENPXCHMBX01.corp.gds.jeppesen.com> <83B2FA13648D5841982336487CE01FE01D76A4D9@DENPXCHMBX01.corp.gds.jeppesen.com> <83B2FA13648D5841982336487CE01FE01D76A630@DENPXCHMBX01.corp.gds.jeppesen.com> <83B2FA13648D5841982336487CE01FE01DA21773@DENPXCHMBX01.corp.gds.jeppesen.com> <83B2FA13648D5841982336487CE01FE01DA217B7@DENPXCHMBX01.corp.gds.jeppesen.com> <83B2FA13648D5841982336487CE01FE01DA217E8@DENPXCHMBX01.corp.gds.jeppesen.com> <83B2FA13648D5841982336487CE01FE01E4E8B87@DENPXCHMBX01.corp.gds.jeppesen.com> <83B2FA13648D5841982336487CE01FE01E8EE630@DENPXCHMBX01.corp.gds.jeppesen.com> <83B2FA13648D5841982336487CE01FE01E9EABEC@DENPXCHMBX01.corp.gds.jeppesen.com> <83B2FA13648D5841982336487CE01FE01EB485E0@DENPXCHMBX01.corp.gds.jeppesen.com> <83B2FA13648D5841982336487CE01FE01EB48737@DENPXCHMBX01.corp.gds.jeppesen.com> <83B2FA13648D5841982336487CE01FE01EB48879@DENPXCHMBX01.corp.gds.jeppesen.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.4.6813,1.0.148,0.0.0000 definitions=2011-05-20_05:2011-05-20,2011-05-20,1970-01-01 signatures=0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.4.6813,1.0.148,0.0.0000 definitions=2011-05-20_05:2011-05-20,2011-05-20,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=2 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=-80 reason=mlx scancount=1 engine=6.0.2-1012030000 definitions=main-1105200169 X-Virus-Checked: Checked by ClamAV on apache.org The configuration that I have is huge, not only in number of mediators and = sequences, but I am using lot of class mediators. That makes the configurat= ion un useful for any who does not have the code. What I will do is that I will try to reproduce it with synapse server and p= ost the results here. Thanks, Abid -----Original Message----- From: Rajika Kumarasiri [mailto:rajika@wso2.com] Sent: Thursday, May 19, 2011 11:22 PM To: user@synapse.apache.org Subject: Re: Please help: does Synapse leak memory? Can you attach your Synapse configuration if possible? And tell which endpoint has a typo ? Rajika On Thu, May 19, 2011 at 11:47 PM, Abid Khan-EXT wro= te: > Thanks Hiranya, > > I have done some more research, and found out the it leaks memory only on > the failures. Not on successful deliver. > > To give you the back ground, I had a typo in one of the endpoint URL. And= I > had only two endpoints, all the message that were attempted to be deliver= ed > to that "wrong" url; failed. That is what lead to this leaking issue. > > On the other hand the server I was testing had -Xms1024m, and -Xmx2048m. = So > its little better than what I was thinking. > > I am still digging into and trying to find where the leak is. I will upda= te > if I found anything but so far it's a leak on the failures only. > > If you can find out if this is correct that Synapse could leak those two > object on failures. That will help. > > Thanks, > Abid > > > > > -----Original Message----- > From: Hiranya Jayathilaka [mailto:hiranya911@gmail.com] > Sent: Thursday, May 19, 2011 12:09 PM > To: user@synapse.apache.org > Subject: Re: Please help: does Synapse leak memory? > > Synapse creates an Axis2MessageContext for each message received. Each > Axis2MessageContext instance encapsulates a MessageContext object. But > Synapse does not keep them in memory for too long. As soon as messages ar= e > mediated and sent to the corresponding endpoints/clients, they are > discarded. These objects could be fairly big since they contain message > payload, properties and all other context information of messages. So if > Synapse is keeping them in memory forever, we won't be able to run any > scenario with Synapse for more than several hours. But as Paul mentioned = we > have seen some pretty heavy duty deployments of Synapse dealing with > hundreds of transactions every second. One of the key strengths of Synaps= e > is that it can handle very high volumes of messages with a very small > memory > footprint. > > How much memory have you allocated for JBoss server? Also what is your > Synapse configuration like? What's the memory usage pattern when you run > Synapse standalone (ie without JBoss)? > > Thanks, > Hiranya > > On Thu, May 19, 2011 at 9:17 PM, Abid Khan-EXT >wrote: > > > Hello Paul, > > > > What you are telling me is a good news. The facts I have here, are > > different. I ran the server for a load-test and ran only 26000 message > (of > > about 1K each message size), that made the GC threads taking over every > > thing, the java process was so stuck that the jboss-shutdown command > could > > not bring it down. > > > > And my trace log (memory profiling) showed that one instance of both > > MessageContext and Axis2MessageContext were leaked for every message th= at > is > > delivered/processed. > > > > I am using 1.2 GA of synapse. And I am running it in JBoss. > > > > And will be more than happy to send the thread dump, but that is very > big. > > > > Once again thanks for getting back to me and I am looking for good > pointers > > from you very soon. > > > > Regards, > > Abid > > > > > > > > > > -----Original Message----- > > From: Paul Fremantle [mailto:pzfreo@gmail.com] > > Sent: Wednesday, May 18, 2011 8:39 PM > > To: user@synapse.apache.org > > Subject: Re: Please help: does Synapse leak memory? > > > > Abid > > > > Can you give us some idea of the flows? I know that Synapse is usually > > memory safe - I have thread dumps from people who have pumped 134 > > terabytes of data, 1.4 billion messages and all this with a max heap > > size of <2Gb and no leaks. > > > > Paul > > > > On Thu, May 19, 2011 at 1:49 AM, Abid Khan-EXT > > wrote: > > > Hello all, > > > > > > I am troubleshooting an instance where I had used Synapse, the issue = is > > that after delivering few thousand message server runs out of memory. > > > > > > I investigated and found out that for each message that is delivered > > Synapse is leaking following two objects: > > > > > > 1) org.apache.axis2.context.MessageContext > > > > > > 2) org.apache.synapse.core.axis2.Axis2MessageContext > > > > > > I thought that it might be related to threads and ThreadLocal, but wh= en > I > > scanned the thread local of all 160+ threads those objects were not > there. > > > > > > It seems that synapse is keeping those two object in its some interna= l > > object, that is difficult to find. > > > > > > Because of this problem those objects; server leaks memory at very hi= gh > > rate, and freezes after few hours of running? > > > > > > Any immediate response will be appreciated, > > > > > > > > > Thanks, > > > Abid > > > > > > > > > > > -- > > Paul Fremantle > > Co-Founder and CTO, WSO2 > > Apache Synapse PMC Chair > > OASIS WS-RX TC Co-chair > > > > blog: http://pzf.fremantle.org > > paul@wso2.com > > > > "Oxygenating the Web Service Platform", www.wso2.com > > > > > > -- > Hiranya Jayathilaka > Senior Software Engineer; > WSO2 Inc.; http://wso2.org > E-mail: hiranya@wso2.com; Mobile: +94 77 633 3491 > Blog: http://techfeast-hiranya.blogspot.com >