To clarify, for any particular db file, the server only opens and closes once. We don't seem to notice any performance issues. However, our server does create a number of different h2.db files and during those heavily loaded conditions we will get a dangling lock file which causes issues for the reader processes. So the issue we really have is how we can avoid the dangling h2 lock file.
On Wednesday, January 23, 2013 2:34:36 PM UTC-5, Thomas Mueller wrote: > Hi, > > Opening and closing the database is very slow. Couldn't you use the server > mode, and only open and close the database once? > > Regards, > Thomas > > > > On Tue, Jan 22, 2013 at 2:47 PM, Miles Reucroft > <[email protected]<javascript:> > > wrote: > >> Thanks for looking. The other piece of the puzzle is that we have a lot >> of reader processes that try to open read only connections to the data. >> They seem to have errors when the lock file is present. >> >> On Friday, January 18, 2013 11:26:34 AM UTC-5, Miles Reucroft wrote: >> >>> We have an app with a single H2 writer. The writer is an rmi server and >>> receives requests from multiple clients. The writer opens an H2 connection, >>> writes the data, and closes the connection. This seems to work fine for the >>> most part. Occasionally, we see under heavy loads that the .h2.lock file >>> doesn't get removed. Very rarely happens but we can't see a scenario where >>> we're not closing the connection. >>> >>> My question is the following: looking at FileLock.java in the 1.3.66.1 >>> vintage of H2, I see in the unlock() method that the lock file is removed >>> before the watchdog thread is stopped. Doesn't that leave a small window >>> open for the watchdog thread to recreate the lock file resulting in the >>> dangling file? Shouldn't the watchdog thread be stopped first and then the >>> file removed? >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "H2 Database" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/h2-database/-/qxvdWDNaEFcJ. >> >> To post to this group, send email to [email protected]<javascript:> >> . >> To unsubscribe from this group, send email to >> [email protected] <javascript:>. >> For more options, visit this group at >> http://groups.google.com/group/h2-database?hl=en. >> > > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
