Hi David,

I use H2 as an embedded database in desktop software with a substantial 
user base. I also occasionally get crash reports with similar errors. A few 
years ago this was frequent, but year after year these have been been 
becoming infrequent.

As far as I can tell, it happens sporadically when someone suddenly loses 
power while H2 is writing.

I minimised this problem by reducing my use of long-running transactions. 
As much as possible I use auto-commit on every write.






On Wednesday, 2 April 2014 12:47:57 UTC+2, David Anstee wrote:
>
> Hi,
>
> We have been using H2 as an embedded database in one of our java 
> applications and have been experiencing some database corruption issues 
> with some of our users. We do not disable the transaction log, or the file 
> locking as I know these can potentially cause corruption of the database 
> but we still occasionally receive complaints of corrupted databases. As the 
> issues have been occurring on the client’s machines it has been hard for us 
> to track down what is causing them. The exception messages we receive when 
> opening the H2 database also appear to vary. The most recent exception, 
> which we had this morning, was:
>
> org.h2.jdbc.JdbcSQLException: General error: "java.lang.RuntimeException: 
> rowCount expected 51427 got 51390 T154.I178" 
> [50000-175]org.h2.jdbc.JdbcSQLException: General error: 
> "java.lang.RuntimeException: rowCount expected 51427 got 51390 T154.I178" 
> [50000-175]
>
> In the past we have attempted to use the recovery tool to restore a 
> database but so far we have been unable to recover a single one. I'm not 
> sure if this is due to the process that we go through or the corruption of 
> the database but the recovery tool never appears to work successfully.
>
> The connection string we use to the database is:
> "jdbc:h2:split:31:" + DBFILE + 
> ";PAGE_SIZE=8192;CACHE_SIZE=524288;CACHE_TYPE=SOFT_LRU;database_event_listener='"
>  
> + H2EventListener.class.getName() + "';USER=" + dbusername + ";PASSWORD=" + 
> dbpassword;
>
> We have, up until last week, been using version 1-3-169.jar but have now 
> moved to 1.3.175.jar
>
> Thanks,
> David
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to