From derby-user-return-8667-apmail-db-derby-user-archive=db.apache.org@db.apache.org Wed Feb 13 22:42:03 2008 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 2182 invoked from network); 13 Feb 2008 22:42:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Feb 2008 22:42:03 -0000 Received: (qmail 20034 invoked by uid 500); 13 Feb 2008 22:41:56 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 19581 invoked by uid 500); 13 Feb 2008 22:41:55 -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 19570 invoked by uid 99); 13 Feb 2008 22:41:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Feb 2008 14:41:55 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [68.142.200.125] (HELO web30602.mail.mud.yahoo.com) (68.142.200.125) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 13 Feb 2008 22:41:06 +0000 Received: (qmail 65005 invoked by uid 60001); 13 Feb 2008 22:41:26 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=oBRMxVz86E65OuHXSKjkleCO0Qc30TWgQoF0vjLnV3cip5R60dW8edcFmAgVmP4lWcK1StnZYdhKS5lwtYMKnDh6j0fLBRnbnRI8WvPPdJ1uQKq+wp7xuGeb4Vawc229jwvl5xXOt2YC1BAzvG05XtyF0aaKtS+mfV+dggThIDk=; X-YMail-OSG: 5wmcAlQVM1lf3TGnDMSUjGe1iUuwPd2M5Kkmml.5c6Dpj0EH4JompfkyPwIZte0q0aZ1KUE9zQqIiPc1PqVxMEKqzVpd0yZHBdYaDoZMowIyf83Pjv0O1yRkEr7GNA-- Received: from [129.42.184.35] by web30602.mail.mud.yahoo.com via HTTP; Wed, 13 Feb 2008 14:41:26 PST Date: Wed, 13 Feb 2008 14:41:26 -0800 (PST) From: Suavi Ali Demir Subject: Re: java.lang.OutOfMemoryError To: Derby Discussion In-Reply-To: <47B373AD.5050308@brighton.ac.uk> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1846190304-1202942486=:64965" Content-Transfer-Encoding: 8bit Message-ID: <584840.64965.qm@web30602.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --0-1846190304-1202942486=:64965 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit How much memory do you give to your JVM? Ali John English wrote: I have a table containing about 22000 records defined as follows: CREATE TABLE system_log ( id INTEGER GENERATED ALWAYS AS IDENTITY, time TIMESTAMP DEFAULT NULL, username VARCHAR(15), facility VARCHAR(15) NOT NULL, event VARCHAR(31) NOT NULL, module VARCHAR(15), test VARCHAR(255), details VARCHAR(32000), CONSTRAINT systemlog_pk PRIMARY KEY (id) ); I format this for display using a view defined like this: CREATE VIEW system_log_view AS SELECT TimeFormat(time) AS x_time, facility, event, details, NameFormat(surname,initials) AS name, system_log.username AS username, module, test, time, id FROM system_log LEFT JOIN users ON system_log.username=users.username I then display the log using "SELECT * FROM system_log_view", which takes about a minute to execute. (Taking out the join on the users table and just displaying usernames rather than surnames and initials takes a few seconds off, but not much.) When I try to display it sorted into descending order of time (SELECT * FROM system_log_view ORDER BY time DESC) I often (but not always) get a java.lang.OutOfMemoryError. The "not always" is presumably down to overall system loading, but it's running on a reasonably powerful machine (a 64 bit Linux system with about 4G of memory and loads of disk space). Can anyone suggest what I can do to prevent this, or at least to narrow down the reasons for the error? My last-ditch "catch Throwable" handler doesn't give me a stack frame dump so it's hard to tell what's really going on. TIA, ---------------------------------------------------------------------- John English | mailto:je@brighton.ac.uk Senior Lecturer | http://www.it.bton.ac.uk/staff/je School of Computing & MIS | "Those who don't know their history University of Brighton | are condemned to relive it" (Santayana) ---------------------------------------------------------------------- --------------------------------- Looking for last minute shopping deals? Find them fast with Yahoo! Search. --0-1846190304-1202942486=:64965 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
How much memory do you give to your JVM?
Ali

John English <je@brighton.ac.uk> wrote:
I have a table containing about 22000 records defined as follows:

CREATE TABLE system_log (
id INTEGER GENERATED ALWAYS AS IDENTITY,
time TIMESTAMP DEFAULT NULL,
username VARCHAR(15),
facility VARCHAR(15) NOT NULL,
event VARCHAR(31) NOT NULL,
module VARCHAR(15),
test VARCHAR(255),
details VARCHAR(32000),
CONSTRAINT systemlog_pk PRIMARY KEY (id)
);

I format this for display using a view defined like this:

CREATE VIEW system_log_view AS
SELECT TimeFormat(time) AS x_time,
facility,
event,
details,
NameFormat(surname,initials) AS name,
system_log.username AS username,
module,
test,
time,
id
FROM system_log LEFT JOIN users
ON system_log.username=users.username

I then display the log using "SELECT * FROM system_log_view", which takes
about a minute to execute. (Taking out the join on the users table and just
displaying usernames rather than surnames and initials takes a few seconds
off, but not much.)

When I try to display it sorted into descending order of time (SELECT * FROM
system_log_view ORDER BY time DESC) I often (but not always) get a
java.lang.OutOfMemoryError. The "not always" is presumably down to overall
system loading, but it's running on a reasonably powerful machine (a 64 bit
Linux system with about 4G of memory and loads of disk space).

Can anyone suggest what I can do to prevent this, or at least to narrow down
the reasons for the error? My last-ditch "catch Throwable" handler doesn't
give me a stack frame dump so it's hard to tell what's really going on.

TIA,

----------------------------------------------------------------------
John English | mailto:je@brighton.ac.uk
Senior Lecturer | http://www.it.bton.ac.uk/staff/je
School of Computing & MIS | "Those who don't know their history
University of Brighton | are condemned to relive it" (Santayana)
----------------------------------------------------------------------


Looking for last minute shopping deals? Find them fast with Yahoo! Search. --0-1846190304-1202942486=:64965--