Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 41903 invoked from network); 20 Mar 2008 04:07:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Mar 2008 04:07:28 -0000 Received: (qmail 12806 invoked by uid 500); 20 Mar 2008 04:07:25 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 12775 invoked by uid 500); 20 Mar 2008 04:07:25 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 12764 invoked by uid 99); 20 Mar 2008 04:07:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Mar 2008 21:07:25 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kevan.miller@gmail.com designates 209.85.132.240 as permitted sender) Received: from [209.85.132.240] (HELO an-out-0708.google.com) (209.85.132.240) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Mar 2008 04:06:35 +0000 Received: by an-out-0708.google.com with SMTP id c34so150031anc.132 for ; Wed, 19 Mar 2008 21:06:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; bh=DxvkORz3LimNhMye7ve8QgHxxY7GM3vJZs8SHja74UQ=; b=BgWErUFLFsPgUJkdjRCuQZJZRQ6hUgVr0UqJn1HYHIBxX7zn8ngdWxDS68wkbqkBLG3xGxYQ9mFdwqP3LEGfcTg3HkXYmSqd1H/RHgtqKQuqv/AaAQ/Wk/cLZx9eLbtBNIppkk1gQlHu6H10JluGBbHhg+122H//hEw45YmvIkU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; b=QpWc5jWbf+jcQGnweQt08tTYpCE1u+8d+9Tr0htlDDekWWsbsmATHuAPmIfhw6uuEywvxHNs77Y8lUNzK9lJqLQ1dH5scp05U1wfZdREZF7Q46tXpme0ZV3g13RhdXstu6/UackFvxThrd6oNZ4w5UrpxK/5zGrQkfPcNxQHaPU= Received: by 10.100.105.15 with SMTP id d15mr4314610anc.53.1205985641285; Wed, 19 Mar 2008 21:00:41 -0700 (PDT) Received: from ?10.0.1.193? ( [76.182.118.42]) by mx.google.com with ESMTPS id h40sm2001533wxd.36.2008.03.19.21.00.40 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Mar 2008 21:00:40 -0700 (PDT) Message-Id: <1AEA125E-1FD2-4ADB-9E9A-85581BC996AC@gmail.com> From: Kevan Miller To: user@geronimo.apache.org In-Reply-To: <16168531.post@talk.nabble.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: Tracking Down Memory Leaks in G1.2 Date: Thu, 20 Mar 2008 00:00:36 -0400 References: <16168531.post@talk.nabble.com> X-Mailer: Apple Mail (2.919.2) X-Virus-Checked: Checked by ClamAV on apache.org On Mar 19, 2008, at 8:24 PM, ApolloX wrote: > > I've noticed in most versions of Geronimo there appear to be memory > leaks. > For example, if I use the Hot Deployer to redeploy an EAR multiple > times a > time on a development server, it often leads to OutOfMemory exceptions > regardless of how much the EAR is actually used. In more general > environments, though, the server slowly accumulates memory until it > requires > a restart every few days (or sooner). > > I'm trying to address these issues by writing code that actively > flushes any > static application objects and runs garbage collection after, but I > haven't > had much success in decreasing memory over time. Can someone > provide me > with code that I can use to flush the EJB container cache? If I can > actively flush that cache, at least I can rule out it for potential > memory > leaks. > > I'm using openejb+tranql+mysql, but my understanding is that the > cache is > owned by openejb. I've tried determining how to flush the EJB CMP2 > cache > but I have yet to locate source code for openejb 2.2. Anyone have > any code > (or suggestions) for how to flush the CMP2 cache? OpenEJB 2.2 source is here -- https://svn.apache.org/repos/asf/incubator/openejb/tags/openejb-2.2 Do you have evidence that an OpenEJB cache is the cause of your problem? If not, I'd suggest you use a profiler (e.g. JProfiler or YourKit) to analyze your memory growth. I like to use the '-XX: +HeapDumpOnOutOfMemoryError' JRE option and analyze the resultant heapdump... If you're seeing these OOME problems on 2.0 or 2.1, let me know and I'll have a look... IIRC, I tested deploy/undeploy on 2.0 and we were clean. It's easy for problems to sneak back in, however... --kevan