db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John C. Turnbull" <ozem...@ozemail.com.au>
Subject RE: [n00b] Recovering from program crashes
Date Mon, 02 Apr 2007 22:10:07 GMT
> -----Original Message-----
> From: Oystein.Grovlen@Sun.COM [mailto:Oystein.Grovlen@Sun.COM]
> Sent: Tuesday, 3 April 2007 02:44
> To: Derby Discussion
> Subject: Re: [n00b] Recovering from program crashes
> There is a file in the db directory db.lck that is created to prevent
> dual booting.  See
> http://db.apache.org/derby/docs/10.2/devguide/cdevdvlp20458.html for
> more info.
> By removing that file you should be able to boot.  However, make sure
> that no other process is accessing the database.  Derby will try to
> delete this file itself.  If it fails, it is an indication that some
> other process has an open file descriptor for this file.

When does Derby try to delete the lock file?  When it shuts down or when it
starts up?  If the program crashes then obviously Derby won't get a chance
to delete the lock file.

> Could it be
> that a process that earlier has accessed the DB is hanging and not
> actually removed until you reboot the DB?

No, this is not what's happening.  It seems that if the program that access
the Derby database crashes then it won't be able to start the database the
next time it starts.  Maybe it is just as simple as deleting the lock file
when this happens (but only after establishing for sure that a second
instance of the application is not already running).



View raw message