Home > Archive > Java Help > January 2007 > OutOfMemoryError: Java Heap Space
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
OutOfMemoryError: Java Heap Space
|
|
| Markus Müller-Trapet 2007-01-24, 7:11 pm |
| Hey y'all,
I'm having this problem with an OOME that occurs in the following situation:
I have an update procedure that goes through a resultset from a
mysql-database and calls another function that loads and saves audio
records for each result.
After about 400 results I get the OOME.
My question is, shouldn't the garbage collection free the memory used by
the load/save function after each call? If not, how can I fix the error?
I've tried to run the JVM with more heap space memory, but that didn't
change anything. I'm running JRE 1.5 on Eclipse 3.2 and MySQL 5.0 (Windows).
Any help appreciated.
Greetings,
Markus
| |
| Andrew Thompson 2007-01-24, 7:11 pm |
| On Jan 25, 6:38 am, Markus M=FCller-Trapet <markusmtREMOV...@web.de>
wrote:
> Hey y'all,
> I'm having this problem with an OOME that occurs in the following situati=
on:
>
> I have an update procedure that goes through a resultset from a
> mysql-database and calls another function that loads and saves audio
> records for each result.
>
> After about 400 results I get the OOME.
> My question is, shouldn't the garbage collection free the memory used by
> the load/save function after each call?
It should, so long as there are no further references to
old object, but..
>=2E.If not, how can I fix the error?
..=2Ethe JVM is notorious for caching images, and
I suspect the same might be true of audio.
How are you loading and processing the audio
files? (If it is on a byte-by-byte read/write basis,
these problems should not manifest).
Can you post a code snippet that demonstrates
the basic process that the code is performing?
(Anything short of that, is just guessing).
Andrew T.
| |
| Matt Humphrey 2007-01-24, 10:06 pm |
|
"Markus Müller-Trapet" <markusmtREMOVEME@web.de> wrote in message
news:51pqtaF1iaih2U1@mid.dfncis.de...
> Hey y'all,
> I'm having this problem with an OOME that occurs in the following
> situation:
>
> I have an update procedure that goes through a resultset from a
> mysql-database and calls another function that loads and saves audio
> records for each result.
>
> After about 400 results I get the OOME.
> My question is, shouldn't the garbage collection free the memory used by
> the load/save function after each call? If not, how can I fix the error?
>
> I've tried to run the JVM with more heap space memory, but that didn't
> change anything. I'm running JRE 1.5 on Eclipse 3.2 and MySQL 5.0
> (Windows).
Are you sure you're closing the statement / resultset as you finish with
each one? Some drivers hang onto memory unless they've been closed.
Matt Humphrey
| |
| Markus Müller-Trapet 2007-01-25, 8:08 am |
| Andrew Thompson schrob:
> On Jan 25, 6:38 am, Markus Müller-Trapet <markusmtREMOV...@web.de>
> wrote:
>
> It should, so long as there are no further references to
> old object, but..
>
>
> ..the JVM is notorious for caching images, and
> I suspect the same might be true of audio.
>
> How are you loading and processing the audio
> files? (If it is on a byte-by-byte read/write basis,
> these problems should not manifest).
> Can you post a code snippet that demonstrates
> the basic process that the code is performing?
> (Anything short of that, is just guessing).
>
> Andrew T.
>
Thanks for the input, but I just found out that it's actually just two
large records that are causing the trouble.
The problem seems to be the saving. I guess I have a problem there ...
Markus
|
|
|
|
|