Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 17745 invoked from network); 9 Oct 2007 10:27:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Oct 2007 10:27:52 -0000 Received: (qmail 33332 invoked by uid 500); 9 Oct 2007 10:27:39 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 32869 invoked by uid 500); 9 Oct 2007 10:27:38 -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 32857 invoked by uid 99); 9 Oct 2007 10:27:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2007 03:27:38 -0700 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [192.18.6.21] (HELO gmp-eb-mail-1.sun.com) (192.18.6.21) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2007 10:27:39 +0000 Received: from fe-emea-10.sun.com (gmp-eb-lb-2-fe3.eu.sun.com [192.18.6.12]) by gmp-eb-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id l99AR7KB015215 for ; Tue, 9 Oct 2007 10:27:07 GMT Received: from conversion-daemon.fe-emea-10.sun.com by fe-emea-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0JPN001012TU8T00@fe-emea-10.sun.com> (original mail from John.Embretsen@Sun.COM) for derby-user@db.apache.org; Tue, 09 Oct 2007 11:27:07 +0100 (BST) Received: from [129.159.112.236] by fe-emea-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0JPN00HUB3OM7Z20@fe-emea-10.sun.com> for derby-user@db.apache.org; Tue, 09 Oct 2007 11:26:46 +0100 (BST) Date: Tue, 09 Oct 2007 12:25:44 +0200 From: John Embretsen Subject: Re: Inserting data into a database on a Derby network server In-reply-to: <470B4E69.5090804@Sun.com> Sender: John.Embretsen@Sun.COM To: Derby Discussion Reply-to: derby-user@db.apache.org Message-id: <470B5728.9080800@Sun.COM> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: <1191836883.19938.22.camel@hall.fysik.dtu.dk> <470A109F.9090800@Sun.com> <470A50A6.1060208@amberpoint.com> <470B30E0.8040606@Sun.COM> <470B4E69.5090804@Sun.com> User-Agent: Thunderbird 2.0.0.6 (X11/20070802) X-Virus-Checked: Checked by ClamAV on apache.org Kristian Waagan wrote: > John Embretsen wrote: >> Hi Ture, > > [ snip ] > >> I didn't think it was this easy to fill up the heap (by not explicitly >> closing Statement objects) anymore (see e.g. DERBY-210), but there are >> obviously some vulnerabilities left. So thank you for sharing your >> code and for reporting this! > > Hi John, > > I think the reason why the OOME happened so fast in this application was > because of the sorting (ORDER BY). I don't know enough about how sorting > is implemented in Derby to have an opinion, but I think we should have a > look at it. > > I will do a little pre-investigation and create a Jira if appropriate. OK, thanks! From quickly reading the thread I was under the impression that adding a call to Statement.close() solved the problem, but I guess that was only part of it. One of the DOTS tests I've been running also stumbled across a memory leak related to sorting, see http://issues.apache.org/jira/browse/DERBY-2176 . Interesting coincidence. That was fixed with 10.2.2.0, though, so this must be something else. -- John