I was running my app overnight using 1.2.138 and came back to it to
see a bunch of errors that say "Timeout Trying to lock table". I
poked around and found:
http://groups.google.com/group/h2-database/browse_thread/thread/51b1f743076fdac3?pli=1
This suggests trying with MVCC, so I changed to connection string from:
jdbc:h2:file:C:\path\h2\queue\tq;CACHE_SIZE=131072;CACHE_TYPE=LRU;WRITE_DELAY=5000
to:
jdbc:h2:file:C:\path\h2\queue\tq;CACHE_SIZE=131072;CACHE_TYPE=LRU;WRITE_DELAY=5000;MVCC=TRUE
And then restarted. Now when I run the DB (the same DB that had all
the lock timeout errors) I get ArrayIndexOutOfBoundsException. (full
trace below)
Looking at it again, could the "WRITE_DELAY=5000" cause the lock
timeouts? Perhaps I should lower that rather then use MVCC. The only
reason I would want MVCC is to avoid the table locking. (assuming the
overhead is not great)
Thanks for any pointers
Ryan
Caused by: org.h2.jdbc.JdbcSQLException: General error:
"java.lang.ArrayIndexOutOfBoundsException: 5"; SQL statement:
UPDATE MY_TABLE SET worker='discovery-worker-2', state='WORKING',
checkout=NOW() WHERE id='c6490b57cafc5004' [50000-138]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
at org.h2.message.DbException.get(DbException.java:156)
at org.h2.message.DbException.convert(DbException.java:279)
at org.h2.command.Command.executeUpdate(Command.java:219)
at
org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:124)
at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:109)
at
org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
at
org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
at voyager.common.sql.SQLPool$11.runTransaction(SQLPool.java:376)
at voyager.common.sql.SQLPool$11.runTransaction(SQLPool.java:373)
at voyager.common.sql.SQLPool.transaction(SQLPool.java:147)
... 8 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 5
at org.h2.index.PageDataLeaf.getRowAt(PageDataLeaf.java:308)
at org.h2.index.PageDataLeaf.getRow(PageDataLeaf.java:425)
at org.h2.index.PageDataNode.getRow(PageDataNode.java:282)
at org.h2.index.PageDataNode.getRow(PageDataNode.java:282)
at org.h2.index.PageDataNode.getRow(PageDataNode.java:282)
at org.h2.index.PageDataIndex.getRow(PageDataIndex.java:387)
at org.h2.index.PageDataIndex.getRow(PageDataIndex.java:376)
at org.h2.table.RegularTable.getRow(RegularTable.java:104)
at org.h2.index.PageBtreeIndex.getRow(PageBtreeIndex.java:285)
at org.h2.index.PageBtreeCursor.get(PageBtreeCursor.java:45)
at org.h2.index.MultiVersionCursor.get(MultiVersionCursor.java:81)
at org.h2.index.IndexCursor.get(IndexCursor.java:207)
at org.h2.table.TableFilter.get(TableFilter.java:426)
at org.h2.command.dml.Update.update(Update.java:88)
at org.h2.command.CommandContainer.update(CommandContainer.java:70)
at org.h2.command.Command.executeUpdate(Command.java:199)
... 15 more
--
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.