Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Garbage collection not happening?

Re: Garbage collection not happening?

From: Heinz Huber <hhuber_at_racon-linz.at>
Date: Mon, 02 Sep 2002 06:14:56 GMT
Message-ID: <3d73014b.2391108@news.aon.at>

cOn 28 Aug 2002 13:32:18 -0700, jacygrannis_at_yahoo.com (Jacy Grannis) wrote:

>I have a very curious problem that I can not figure out a good cause
>for. Here's the story: we are using iPlanet 6.0sp2 on jdk1.3.1, and
>Oracle 8.1.7. There is an option on our site where a user can click a
>link and download a .csv file containing a lot of information from the
>db. This .csv file can be as much as 6MB big. It has, at most, about
>17,000 rows in it. Each row has ~60 columns. The exact numbers
>depend on options the user has selected before choosing to do the
>download. If the user selects the option that would pull down the
>entire data-set, this invariably causes the machine to run out of
>memory. An OutOfMemoryError is thrown, and the server restarts
>itself. It seems to run out of memory in the loop where it is pulling
>the data out of the result set. However, I assure you it is doing
>nothing unusual in that loop. The loop is of the form:
>
>MyObject mo;
>List l = new ArrayList();
>while (rs.next())
>{
> mo = new MyObject();
> mo.setData1(rs.getString("data1"));
> mo.setData2(rs.getString("data2"));
> ...many more similar calls...
> l.add(mo);
>}

[snip]

One question:
Why are you putting the results in an ArrayList? If you can write each record to the file directly, you might be able to work around the problem.

Regards,
Heinz Received on Mon Sep 02 2002 - 01:14:56 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US