OutOfMemoryException when opening the database

5 views
Skip to first unread message

Chris Kopec

unread,
Nov 4, 2009, 10:54:00 AM11/4/09
to h2-da...@googlegroups.com
When attempting to open this database I get an OutOfMemory exception.  It looks like h2 attempts to allocate 400MB when opening the initial connection.  To get into this state I was using 1.1.112 however I copied the database to my local computer and used the 1.1.118 and it still runs out of memory.

I have attached the database that causes the exception.  Is there any way to recover from this?

db.zip

Thomas Mueller

unread,
Nov 8, 2009, 7:07:55 AM11/8/09
to h2-da...@googlegroups.com
Hi,

Strange is that one of the log files is missing. There are:
mddb.9.log.db and mddb.11.log.db, but no .10.log.db. Usually, there
should be only one log file (the latest; in this case the .11.log.db).

The .9.log.db file seems to be corrupt. When I delete it, I can open
the database. I don't know what could have caused the .log.db file to
get corrupt, maybe there was a power failure while writing to the
file?

Regards,
Thomas

Chris

unread,
Nov 9, 2009, 10:02:13 AM11/9/09
to H2 Database
Thanks for the information. Is there any way to recover the data? I
tried running the recover command but that also showed an out of
memory exception.



On Nov 8, 7:07 am, Thomas Mueller <thomas.tom.muel...@gmail.com>
wrote:

Thomas Mueller

unread,
Nov 11, 2009, 1:14:32 AM11/11/09
to h2-da...@googlegroups.com
Hi,

> Thanks for the information.  Is there any way to recover the data?

Sure, delete the .9.log.db file and open the database. The corrupt
.9.log.db file doesn't contain any user data as far as I see.
Afterwards, create a SQL script using SCRIPT and re-create the
database using RUNSCRIPT.

Regards,
Thomas

Reply all
Reply to author
Forward
0 new messages