db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Burlison <Alan.Burli...@sun.com>
Subject Re: Derby causes PermGen leaks in Tomcat
Date Mon, 24 Sep 2007 16:27:31 GMT
Kathey Marsden wrote:

> Alan Burlison wrote:
>>
>> So it's clear that although the Derby server is stopped, it's still 
>> zombified somewhere inside the Tomcat JVM.  How do I cleanly and 
>> completely remove Derby from a running JVM?
>>
> Is it possible you are seeing DERBY-2905? If so please try out the patch 
> for that issue which is currently posted for review.
> https://issues.apache.org/jira/browse/DERBY-2905

It's entirely possible, in fact I'd say it is very likely.  Poking 
around a heap dump with jhat shows that the AutoloadedDriver is still 
resident after undeploying the application.

How do I test the patch?  I've no idea how to build Derby, I'm just 
using the standard 10.3.1.4 release Jars.

Also, I've put code in that manually unregisters the EmbeddedDriver, but 
I'm a bit puzzled because it doesn't seem to be loaded in the first 
place - I've added code to list the loaded drivers befor and after the 
unload, and here is what I see:

Unloading org.apache.derby.jdbc.EmbeddedDriver@1e91259
Before
sun.jdbc.odbc.JdbcOdbcDriver@35e6e3
org.apache.derby.jdbc.AutoloadedDriver@1a2760f
org.apache.derby.jdbc.ClientDriver@1cd2b82
After
sun.jdbc.odbc.JdbcOdbcDriver@35e6e3
org.apache.derby.jdbc.AutoloadedDriver@1a2760f
org.apache.derby.jdbc.ClientDriver@1cd2b82

It does seem to point to the AutoloadedDriver as being the problem though...

-- 
Alan Burlison
--

Mime
View raw message