hello sir, In my table i have 35 columns and using* union* iam iterating my table 5 times so first 2 or 3 times the table is getting executed but after that if i try to execute it is throwing exception as Out of memory.; SQL statement:<https://192.168.123.103:8082/query.do?jsessionid=ac1f3bd0cc559edbf5156d23e4dd503d#>
example of my query is like this select * from table_name union select * from table_name union select * from table_name union select * from table_name union select * from table_name I need to execute my table like this using union and some conditions and table is getting executed also..... But suddenly throwing exception as Out of memory.; SQL statement:<https://192.168.123.103:8082/query.do?jsessionid=ac1f3bd0cc559edbf5156d23e4dd503d#> this is my url jdbc:h2:tcp://localhost/~/abc;auto_reconnect=true;auto_server=true;mvcc=true;cache_size=8150;DB_CLOSE_DELAY=-1; Please suggest me..the solution... Thanks in Advance.... On Friday, November 13, 2009 1:08:50 AM UTC+5:30, ryantxu wrote: > > FYI, a test box (running 122) just got an out of memory error also: > > 2009-11-12 12:29:55,859 ERROR org.eclipse.jetty.util.log - Error for / > java.lang.OutOfMemoryError: Java heap space > at org.h2.value.Value.cache(Value.java:337) > at org.h2.value.ValueByte.get(ValueByte.java:132) > at org.h2.store.DataPage.readValue(DataPage.java:589) > at org.h2.log.UndoLogRecord.load(UndoLogRecord.java:200) > at org.h2.log.UndoLog.getLast(UndoLog.java:81) > at org.h2.engine.Session.commit(Session.java:460) > at org.h2.command.Command.stop(Command.java:178) > at org.h2.command.Command.executeQueryLocal(Command.java:148) > at org.h2.command.Command.executeQuery(Command.java:123) > at > org.h2.jdbc.JdbcConnection.getInternalAutoCommit(JdbcConnection.java: > 386) > at > org.h2.jdbc.JdbcConnection.getAutoCommit(JdbcConnection.java:378) > at > org > .apache > .commons > .dbcp.DelegatingConnection.getAutoCommit(DelegatingConnection.java:304) > at org.apache.commons.dbcp.PoolingDataSource > $PoolGuardConnectionWrapper.getAutoCommit(PoolingDataSource.java:224) > at > org > .apache > .commons > .dbcp.DelegatingConnection.getAutoCommit(DelegatingConnection.java:304) > at > org > .apache > .commons > .dbcp > .PoolableConnectionFactory > .passivateObject(PoolableConnectionFactory.java:358) > at > org > .apache > .commons > .pool.impl.GenericObjectPool.addObjectToPool(GenericObjectPool.java: > 1377) > at > org > .apache > .commons > .pool.impl.GenericObjectPool.returnObject(GenericObjectPool.java:1340) > at > org > .apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java: > 87) > at org.apache.commons.dbcp.PoolingDataSource > $PoolGuardConnectionWrapper.close(PoolingDataSource.java:181) > at voyager.common.sql.SQLPool.statement(SQLPool.java:104) > at > voyager.index.sql.VoyagerDataStoreSQL.wipe(VoyagerDataStoreSQL.java: > 1346) > > This was caused while trying to delete everything from a table with a > lot of data: > DELETE FROM table_name; > > After this OOM, the db is then corrupted: > > > Caused by: org.h2.jdbc.JdbcSQLException: General error: > java.lang.ClassCastException: org.h2.store.PageStreamData cannot be > cast to org.h2.index.PageData [50000-122] > at org.h2.message.Message.getSQLException(Message.java:106) > at org.h2.message.Message.convert(Message.java:283) > at org.h2.engine.Database.openDatabase(Database.java:262) > at org.h2.engine.Database.<init>(Database.java:222) > at org.h2.engine.Engine.openSession(Engine.java:58) > at org.h2.engine.Engine.openSession(Engine.java:142) > at org.h2.engine.Engine.getSession(Engine.java:122) > at > org > .h2 > .engine > .SessionFactoryEmbedded.createSession(SessionFactoryEmbedded.java:17) > at > org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java: > 245) > at > org.h2.engine.SessionRemote.createSession(SessionRemote.java:223) > at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:110) > at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:94) > at org.h2.Driver.connect(Driver.java:58) > at > org > .apache > .commons > .dbcp > .DriverConnectionFactory.createConnection(DriverConnectionFactory.java: > 38) > at > org > .apache > .commons > .dbcp > .PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java: > 294) > at > org > .apache > .commons > .dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java: > 1247) > at > org > .apache > .commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java: > 1221) > ... 54 more > Caused by: java.lang.ClassCastException: org.h2.store.PageStreamData > cannot be cast to org.h2.index.PageData > at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:201) > at org.h2.index.PageDataNode.getLastKey(PageDataNode.java:222) > at org.h2.index.PageDataNode.getLastKey(PageDataNode.java:222) > at org.h2.index.PageDataNode.getLastKey(PageDataNode.java:222) > at org.h2.index.PageDataIndex.<init>(PageDataIndex.java:73) > at org.h2.table.TableData.<init>(TableData.java:83) > at org.h2.store.PageStore.addMeta(PageStore.java:1267) > at org.h2.store.PageStore.readMetaData(PageStore.java:1205) > at org.h2.store.PageStore.recover(PageStore.java:1014) > at org.h2.store.PageStore.openExisting(PageStore.java:296) > at org.h2.store.PageStore.open(PageStore.java:254) > at org.h2.engine.Database.getPageStore(Database.java:2294) > at org.h2.engine.Database.open(Database.java:625) > at org.h2.engine.Database.openDatabase(Database.java:228) > ... 68 more > > > The DB is at a customer site, and I am downloading it now ~120MB zipped > > thanks > ryan > > > > On Nov 12, 2009, at 1:30 PM, Thomas Mueller wrote: > > > Hi, > > > >> Looking at output.sql and my SQL file the only differences are where > >> the indexes are added. In mine the indexes are added in the table > >> create statement, where as in output.sql they are added at the end. > >> Do you think this could be the cause of the problem? > > > > It still shouldn't run out of memory. > > > > If you still have a script that runs out of memory each time, could > > you send it? What version of H2 do you use? > > > > Regards, > > Thomas > > > > -- > > > > 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]<javascript:>. > > > To unsubscribe from this group, send email to > [email protected] <javascript:> > > . > > For more options, visit this group at > http://groups.google.com/group/h2-database?hl= > > . > > > > > > -- 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/-/iGvsiexpCEwJ. 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.
