Return-Path: X-Original-To: apmail-ant-dev-archive@www.apache.org Delivered-To: apmail-ant-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E472295C8 for ; Sun, 24 Jun 2012 08:41:46 +0000 (UTC) Received: (qmail 53667 invoked by uid 500); 24 Jun 2012 08:41:46 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 53483 invoked by uid 500); 24 Jun 2012 08:41:45 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 53444 invoked by uid 99); 24 Jun 2012 08:41:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Jun 2012 08:41:43 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [88.84.128.168] (HELO samaflost.de) (88.84.128.168) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Jun 2012 08:41:36 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by samaflost.de (Postfix) with ESMTP id 41CDC40E0071 for ; Sun, 24 Jun 2012 10:41:15 +0200 (CEST) Received: from samaflost.de ([127.0.0.1]) by localhost (v35516.1blu.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5oGhQpFcxJ2B for ; Sun, 24 Jun 2012 10:41:14 +0200 (CEST) Received: by samaflost.de (Postfix, from userid 1000) id BD99340E0070; Sun, 24 Jun 2012 10:41:14 +0200 (CEST) From: Stefan Bodewig To: dev@ant.apache.org Subject: Re: "OutOfMemoryException: PermGen space" error with Ant? References: <1340398906.49515.YahooMailNeo@web112710.mail.gq1.yahoo.com> <1340406612.1669.YahooMailNeo@web112713.mail.gq1.yahoo.com> Date: Sun, 24 Jun 2012 10:41:14 +0200 In-Reply-To: <1340406612.1669.YahooMailNeo@web112713.mail.gq1.yahoo.com> (Charles Chan's message of "Fri, 22 Jun 2012 16:10:12 -0700 (PDT)") Message-ID: <871ul53xw5.fsf@v35516.1blu.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On 2012-06-23, Charles Chan wrote: > I was using dbunit's Ant integration and have a for loop that exports > a bunch of dataset into many small xml files (less than 5-50kb > each). After repeating task for ~50 times, I got an > OutOfMemoryException: PermGen space. There are several hints about a memory leak in Ant related to not cleaning up classloaders used for loading typedefs/taskdefs in subbuilds. So far we haven't pinned down the problem. Are you defining the dbunit tasks inside the or are you spawning new or ot tasks inside that would do so? If so you may be able to work around the problem by defining the tasks inside the main build before the for loop. The other things you may be leaking are JDBC drivers. You could try to load the driver inside the main build explicitly so it never ends up on any other classloader ( should help). Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org