Hi, That's strange. I never saw a case so far where the file locking mechanism was hanging (either it works within a second or, or it fails). Are you sure it actually hangs, or is it possibly just slow (taking a second or so)?
What file system do you use? Maybe the last modified time doesn't match the system time. I saw this in some cases (when using NFS for example). I don't recommend using FILE_LOCK=SOCKET because it is rather dangerous as it relies on network connectivity and correctly configured network settings. I would rather suggest to use FILE_LOCK=FS. Could you try that? Regards, Thomas On Fri, Oct 26, 2012 at 9:54 AM, Tejas Shah <[email protected]> wrote: > I am using H2 with default settings on Red Hat Enterprise Linux and it > causes my tocat server to hang. I created a thread dump and it looks like > H2 keep waiting for gaining lock over the database file. No Exceptions > anywhere. No deadlocks detected in thread dump. I have tried using > sun/Oracle JDK as well as Open JDK. Please note the same application works > fine under Windows 7, ubuntu 12.04 and Cent OS 5.x > > Solution to this was change it to use: FILE_LOCK=SOCKET > > Now, can anybody tell me if I can use this or not? I have a single > application accessing the database. > > > -- > 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/-/GCG1LYWYLvcJ. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > 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]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
