Hi, We recently integrated a database into our web application (*it was previously using a JCR*). We're are currently using *h2* version *1.3.176*.
Our problem is that we see our *H2* database file growing very large (*5GB +*) fairly quickly (*within 1-2 hours*). The only way to get the database file back to a normal size, is to: 1. Stop the server. 2. Open the database file in a database managing tool such as SQL Workbench. 3. Immediately just disconnect. doing this forces the database file size drops back down to *80MB*. *So far we've come-up with 3 possible issues which may be causing our issue:* *H2 Caching* One of my fellow developers mentioned that he thought that this is due to connections not getting closed correctly and the internal H2 cache is not being cleared. We tried applying the *CACHE_SIZE* attribute to the connection string, but either this is not the issue or H2 is not honoring this setting. *Transactions not Being Cleaned-Up* >From my *Googling* I found some people claiming that the growth could be due to transactions not being closed and transaction logs growing out-of-control. *H2 not Firing CHECKPOINT* I found an thread wherein someone claimed that the transaction log growth could be due to the commit not firing a CHECKPOINT and the solution is to fire a CHECKPOINT after each commit. Thread: https://groups.google.com/forum/#!topic/h2-database/L7Yb0X-42tk Thus far we haven't been able to pin this down to connections or transactions being left open. If we can't resolve this in a reasonable amount of time, we'll just have to switch our primary database to something a little more seasoned like *PostgreSQL*. But we like H2 since we can run it on our *Android* client and ideally we would like our different platforms to run the same tech (*where possible*). -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
