db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: AntiGC Not Shutting Down
Date Mon, 24 Oct 2005 08:47:51 GMT
Samer Kanjo <samer@kanjo.net> writes:

> I am running Derby server inside my web application which is running
> in Tomcat 5. I need to run Derby as a server in order to allow batch
> processes and the web application to access the database. What I
> have discovered is that shutting down Derby from within my web
> application does not completely shutdown Derby, the AntiGC thread
> continues to run.
> I checked the mailing list archives and found no references to
> AntiGC. I then checked the derby bugs list and found bug 23 which
> indicated a memory leak and a suggested fix that was
> applied. However the bug has been re-opened due to continuing
> problems. The problems that were identified had to do with the
> embedded driver. I wanted to mention that I am having problems with
> the server as well. I was previously using and switched to
> due to the patch but found that the problem did in fact
> persist.

The patch is not applied to the 10.1 branch because of some minor
problems (NullPointerException can be printed to console when you shut
down Derby, but your application will continue to work). If you want
to try the fix, you can either download a snapshot of the development
version (http://www.multinet.no/~solberg/public/Apache/Derby/builds/)
or download the 10.1 sources and apply the patch yourself.

> When I do shutdown Derby the following 2 threads remain:
> Thread [derby.antiGC] (Running)
> Thread [derby.rawStoreDaemon] (Running)

The only time I have seen that the rawStoreDaemon has continued to run
after a shutdown, is when an error has occurred during the booting of
a database (e.g., invalid encryption password or wrong log device when
performing recovery). I have however seen rawStoreDaemons not being
garbage collected after they have been stopped.

How did you shut down Derby? Did you use
DriverManager.getConnection("jdbc:derby:;shutdown=true")? If you want
to shut down Derby entirely, there should be no database name in the

Knut Anders

View raw message