Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 50609 invoked from network); 4 Jul 2008 15:36:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Jul 2008 15:36:49 -0000 Received: (qmail 31470 invoked by uid 500); 4 Jul 2008 15:36:49 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 31445 invoked by uid 500); 4 Jul 2008 15:36:49 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 31432 invoked by uid 99); 4 Jul 2008 15:36:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jul 2008 08:36:49 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [63.82.107.6] (HELO red.edgility.com) (63.82.107.6) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jul 2008 15:35:58 +0000 Received: from [127.0.0.1] (bp-laptop.edgility.com [10.10.13.17]) by red.edgility.com (8.13.8/8.13.8) with ESMTP id m64FaHJf013202 for ; Fri, 4 Jul 2008 08:36:17 -0700 Message-ID: <486E4374.9090503@amberpoint.com> Date: Fri, 04 Jul 2008 08:36:20 -0700 From: Bryan Pendleton User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Derby Discussion Subject: Re: OutOfMemory References: <18db29d30807040829p1ad8b24ag9f7307f3eec0bd9b@mail.gmail.com> In-Reply-To: <18db29d30807040829p1ad8b24ag9f7307f3eec0bd9b@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org > I am getting into an OutOfMemory error in my case. Which is similar to > the case below. After examining the heap dump, I could find the > PreparedStatement is hold too many internal objects and might lead to > the MemoryLeak. > I am not for sure whether it is caused by my closing the statement after > the long loop, thus causing the client side of derby cashing too many > things. Will that be the problem? Thanks. What are the internal objects which are held? Since you've looked at your memory dump, can you post the number of instances of the various classes at the top of the list? Also, can you re-arrange your application to be able to commit during the loop? A single transaction cannot be arbitrarily large, as there are some resources that cannot be freed until the commit occurs. thanks, bryan