Please can you generate a heap dump. see here for an example. http://stackoverflow.com/questions/542979/using-heapdumponoutofmemoryerror-parameter-for-heap-dump-for-jboss
On Fri, Dec 7, 2012 at 6:07 PM, Dennis Nielsen <[email protected]> wrote: > Hi > > I'm having a database file on around 300MB and when I try to use the > following java code: > > Script.*execute*(url, "sa", "", file); > > The java code runs in tomcat 7.0.32 webapp and access H2 installed as a > windows service (see url below). Will the write delay prevent any disk > access for 30 seconds? Are there any of the settings that could lead to > this out of memory exception? Do you have a proposal of an url? We use the > database with quite large transaction size (1000-10000 entities per > transaction). Any proposals will be greatly appreciated. > > Out of memory exception: > > org.h2.jdbc.JdbcSQLException: Out of memory.; SQL statement: > SCRIPT [90108-169] > at org.h2.message.DbException.getJdbcSQLException(DbException.java:329) > at org.h2.message.DbException.get(DbException.java:158) > at org.h2.message.DbException.convert(DbException.java:275) > at org.h2.command.Command.executeQuery(Command.java:195) > at org.h2.server.TcpServerThread.process(TcpServerThread.java:308) > at org.h2.server.TcpServerThread.run(TcpServerThread.java:149) > at java.lang.Thread.run(Unknown Source) > Caused by: java.lang.OutOfMemoryError: Java heap space > > at org.h2.engine.SessionRemote.done(SessionRemote.java:567) > at org.h2.command.CommandRemote.executeQuery(CommandRemote.java:151) > at org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:76) > at org.h2.tools.Script.process(Script.java:172) > at org.h2.tools.Script.execute(Script.java:153) > at org.h2.tools.Script.execute(Script.java:133) > at com.barrowa.common.util.H2DBUtil.backup(H2DBUtil.java:47) > at com.barrowa.common.util.H2DBUtil.compact(H2DBUtil.java:36) > at > com.barrowa.core.sundial.jobs.DatabaseMaintenanceJob.compact(DatabaseMaintenanceJob.java:215) > at > com.barrowa.core.sundial.jobs.DatabaseMaintenanceJob.execute(DatabaseMaintenanceJob.java:83) > at org.quartz.core.JobRunShell.run(JobRunShell.java:213) > at > org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) > > > H2 url: > > > jdbc:h2:tcp://localhost:50115/sundial;MVCC=TRUE;DB_CLOSE_ON_EXIT=FALSE;DEFRAG_ALWAYS=TRUE;WRITE_DELAY=30000;CACHE_SIZE=65536;LOCK_MODE=0;LOG=0;UNDO_LOG=0 > > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/h2-database/-/i9LoF-T1AKEJ. > 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. > -- 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.
