Hello,

We're stuck on the following problem. Sometimes, the database enters
such a state, so it starts growing to an enormous size (several gigs)
without control. I tried to see whether there's a bug in my code,
which leads to wrong insertions to the database, but the data itself
takes only 5% of the database file size.

Below are my actions:

# ls -lsh
7.0G -rw-r--r-- 1 michael michael 7.2G 2012-04-22 10:34 mydb.h2.db

I tried to connect to the database, and dump it to an SQL file:

# java -cp org.h2_1.3.163.jar org.h2.tools.Shell -url
"jdbc:h2:mydb;CIPHER=AES" -user test -password "test test" -driver
org.h2.Driver
sql> EXPORT TO '/tmp/test.sql'

# ls -lsh /tmp/dump.sql
340M -rw-r--r-- 1 michael      michael      340M 2012-04-22 10:35
test.sql

I tried to defragment the database, and I've got this error:

sql> SHUTDOWN DEFRAG;
Error: org.h2.jdbc.JdbcSQLException: Database is already closed (to
disable automatic closing at VM shutdown, add
";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-163]

Then I looked at the database size, it has grown to 8G!

# ls -lsh
7.9G -rw-r--r-- 1 michael michael 8.0G 2012-04-22 10:47 mydb.h2.db

Any help will be appreciated!

--
Michael

-- 
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.

Reply via email to