db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Embretsen <John.Embret...@Sun.COM>
Subject Re: Tuning Derby: OutOfMemoryError
Date Thu, 08 Feb 2007 11:53:56 GMT
Tim Troup wrote:
> Hi,
> 
> I am trying to delete a bunch of rows from a single database table:
> 
> delete from tableB where tableAId>1409;
> 
>  but keep getting an OutOfMemoryError:
> 
> ERROR XJ001: Java exception: 'Java heap space: java.lang.OutOfMemoryError'.
> 
> tableAId is a foreign key to the primary key of tableA.
> 
> Is there any way I can tune the database to overcome this problem?
> 
> Currently I just start the server using the startNetworkServer script as 
> provided with no modifications.

Which version of Derby are you using? If you are using 10.2.x, I think you can 
set the DERBY_OPTS environment variable before running the startNetworkServer 
script in order to tune the heap size of your server JVM.

E.g. (unix/bash):

export DERBY_OPTS="-Xmx128m"

(this will set the max heap size to 128 MB, and hopefully the problem will go 
away - although the root cause is still there. If it doesn't help, try setting a 
higher max value).

May I ask which JVM (vendor and version) you are using? I find it strange that 
you run out of heap space in this case, but this of course depends on what heap 
settings your JVM is using... (and what you do before executing that delete 
statement).


-- 
John




Mime
View raw message