db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bergquist, Brett" <BBergqu...@canoga.com>
Subject RE: Question on unloading in an embedded environment
Date Wed, 17 Aug 2011 13:01:50 GMT
Here is what jhat reports for the is OOME:

Instance Counts for All Classes (excluding platform)

38006784 instances of class org.apache.derby.impl.store.access.sort.Node 
26547422 instances of class org.apache.derby.impl.store.raw.data.RecordId 
26524427 instances of class [Lorg.apache.derby.iapi.types.DataValueDescriptor; 
26524237 instances of class org.apache.derby.iapi.types.SQLTimestamp 
26524235 instances of class org.apache.derby.impl.store.access.heap.HeapRowLocation 
3323190 instances of class org.apache.derby.iapi.store.raw.PageKey 
31521 instances of class org.apache.derby.impl.store.raw.data.StoredRecordHeader
...

I am trying to get a stack traceback of where some of these are allocated, but there is definitely
a leak in Derby, probably in the implementation of the SYSCS_IMPORT_TABLE somewhere.


-----Original Message-----
From: Rick Hillegas [mailto:rick.hillegas@oracle.com] 
Sent: Tuesday, August 16, 2011 9:20 AM
To: derby-dev@db.apache.org
Subject: Re: Question on unloading in an embedded environment

On 8/16/11 5:56 AM, Bergquist, Brett wrote:
> I am writing a database copy utility that is built upon the dblook utility and using
the SYSCS_UTIL.SYSCS_EXPORT_TABLE  and SYSCS_UTIL.SYSCS_IMPORT_TABLE procedures and I have
this mostly working.  When running this on a large database (110Gb) I am getting an OutOfMemory
exception.  I have the utility setup to use up to 8192Mb of memory so somewhere there is a
problem.  I am running this again with the -XX:+HeapDumpOnOutOfMemoryError switch to see if
I can get a picture on where it is leaking but it will take about 6 hours to get to this point.
>
> In the mean time, assuming the error is not in my utility, I would like to potentially
shutdown the database and restart it to try to work around the OOME.  I am running the database
engine in embedded mode and see the documentation to shutdown the database, but I also see
the following in the Derby 10.8 Reference manual page 293:
>
> "With the embedded driver, if your application shuts down Derby or calls the
> DriverManager.unload method, and you then want to reload the driver, call the
> Class.forName().newInstance() method to do so:"
>
> When I look at the Javadoc for the DriverManager class, I do not find an "unload" method.
 So what is this documentation referring to?
Hi Brett,

That looks like an error in the documentation. I believe it is supposed 
to refer to DriverManager.deregisterDriver(). I have logged 
https://issues.apache.org/jira/browse/DERBY-5384 to track this.

Thanks for finding this bug,
-Rick
> Thanks
>
> Brett
>
>
>
>
>




Mime
View raw message