The database is created from scratch at the start of the test run. The version of H2 (from the manifest) is:
Export-Package: org.h2;version="1.3.167", org.h2.api;version="1.3.167", org.h2.fulltext;version="1.3.167", org.h2.jdbcx;version="1.3.167", org.h2.tools;version="1.3.167", org.h2.util;version="1.3.167" And the SQL gives the same output: 167 I'll try it again without the reconect but it will take a day or so before I'm able to get the results. >From what I know so far: The database closed issue seems to be related to the missing lob issue, I've never seen it without the misisng lob first but I have seen the missing lob error without the DB being closed. I've seen these errors on both solaris x86 and rhl x86 and with and without MVCC. Turning off MVCC seems to have fixed the growing file size problem, I found a long lived connection in our code that has auto commit disabled so I thought that might be the casue so I enabled it and database still growns but all the tests I've run without MVCC have held to a max of 70MB. I have a better test scheduled that should confirm this tomorrow Is there any other info you need? On Thu, Jun 14, 2012 at 6:03 PM, Thomas Mueller < [email protected]> wrote: > Hi, > > I'm not sure (well, I don't think) the problem here is the limit on the > number of LOBs per result set. It might be something completely different. > > Is it reproducible with a newly created database? If it's an existing > database, could you find out which version was used to create the database? > To find out, run > > SELECT * FROM INFORMATION_SCHEMA.SETTINGS > where name='CREATE_BUILD' > > > > "cant truncate the transaction log" > > I know this error message is written to the log sometimes, even thought > the transaction log could be truncated. I'm currently investigating that. I > think it's also not related to the problem - it's just an bug this message > is logged. > > > > the connection has not been closed > > Well, maybe it was closed / has closed, but since you are using > AUTO_RECONNECT=TRUE is might have been re-opened automatically. Could you > try not using the auto-reconnect feature? Just to reduce the complexity of > the problem... The auto re-connect might have an influence. > > I'm not sure if it could be related to MVCC. If you can reproduce the > problem (with a fresh database), but only with MVCC enabled, then we need > to investigate in that. > > Regards, > Thomas > > > > > > > On Thu, Jun 14, 2012 at 8:35 AM, Noel Grandin <[email protected]> > wrote: > > This is a known issue. > > Pretty much all you can do right now is to limit the number LOBs per > > ResultSet that you try and fetch. > > > > I have a fix in mind that involves HMAC and cryptographic cookies, but I > > won't have time to fix it in the near future. > > > > > > On 2012-06-13 08:33, Eoin Byrne wrote: > >> > >> Hi > >> > >> I'm getting an Exception during a very long set of tests - the issue > >> sometimes doesn't happen and sometimes happens in different places but > >> the end result is always the same. > >> > >> The setup: > >> > >> H2 is started programatically by a host process in server mode, this > >> process does the buulk of the access. We have other processes that > >> connect and disconnect through out the tests for various different > >> reasons and an application server that also uses the DB. > >> > >> One of the processes is a bulk load process that makes a number of > >> inserts into H2 and this process seesm to be the issue. It runs > >> without issue but afterwards the host process can no longer access the > >> DB. > >> > >> We generally get 1 or 2 instances of: > >> > >> org.h2.message.DbException: IO Exception: "java.io.IOException: > >> org.h2.jdbc.JdbcSQLException: IO Exception: ""Missing lob: > >> 6008"" [90028-167]" [90028-167] > >> at org.h2.message.DbException.convert(DbException.java:269) > >> at org.h2.engine.SessionRemote.done(SessionRemote.java:572) > >> at org.h2.engine.SessionRemote.readLob(SessionRemote.java:701) > >> at > org.h2.store.LobStorage$RemoteInputStream.read(LobStorage.java: > >> 318) > >> at > java.io.BufferedInputStream.read1(BufferedInputStream.java:256) > >> at java.io.BufferedInputStream.read(BufferedInputStream.java:317) > >> at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264) > >> at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306) > >> at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158) > >> at java.io.InputStreamReader.read(InputStreamReader.java:167) > >> at java.io.BufferedReader.read1(BufferedReader.java:185) > >> at java.io.BufferedReader.read(BufferedReader.java:261) > >> at java.io.BufferedReader.fill(BufferedReader.java:136) > >> at java.io.BufferedReader.read1(BufferedReader.java:187) > >> at java.io.BufferedReader.read(BufferedReader.java:261) > >> at java.io.Reader.read(Reader.java:123) > >> ..... > >> Caused by: org.h2.jdbc.JdbcSQLException: IO Exception: > >> "java.io.IOException: org.h2.jdbc.JdbcSQLException: IO Exception: > >> ""Missing lob: 6008"" [90028-167]" [90028-167] > >> 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:273) > >> at > >> org.h2.server.TcpServerThread.sendError(TcpServerThread.java:211) > >> at org.h2.server.TcpServerThread.run(TcpServerThread.java:151) > >> at java.lang.Thread.run(Thread.java:619) > >> Caused by: java.io.IOException: org.h2.jdbc.JdbcSQLException: IO > >> Exception: "Missing lob: 6008" [90028-167] > >> at > >> org.h2.message.DbException.convertToIOException(DbException.java: > >> 348) > >> at org.h2.store.LobStorage.getInputStream(LobStorage.java:571) > >> at > org.h2.server.TcpServerThread.process(TcpServerThread.java:407) > >> at org.h2.server.TcpServerThread.run(TcpServerThread.java:149) > >> ... 1 more > >> Caused by: org.h2.jdbc.JdbcSQLException: IO Exception: "Missing lob: > >> 6008" [90028-167] > >> at > org.h2.message.DbException.getJdbcSQLException(DbException.java: > >> 329) > >> at org.h2.message.DbException.get(DbException.java:169) > >> at org.h2.message.DbException.get(DbException.java:146) > >> at org.h2.store.LobStorage.getInputStream(LobStorage.java:566) > >> ... 3 more > >> > >> Followed by this everytime we try to access H2: > >> > >> rg.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-167] > >> at > org.h2.message.DbException.getJdbcSQLException(DbException.java: > >> 329) > >> at org.h2.message.DbException.get(DbException.java:169) > >> at org.h2.message.DbException.get(DbException.java:146) > >> at org.h2.message.DbException.get(DbException.java:135) > >> at > org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1386) > >> at org.h2.jdbc.JdbcStatement.checkClosed(JdbcStatement.java:927) > >> at > >> > org.h2.jdbc.JdbcPreparedStatement.checkClosed(JdbcPreparedStatement.java: > >> 1523) > >> at org.h2.jdbc.JdbcStatement.checkClosed(JdbcStatement.java:901) > >> at > >> > org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java: > >> 102) > >> > >> The host process lives on for a few hours and every access gets the DB > >> closed message. > >> > >> There are a few other things worth mentioning - the host process uses > >> only a single connection so I guess the missing lob issue is causing > >> the connection to get closed or at least the session object to get > >> marked as closed, I could reset the connection when I've gotten the > >> above error but thats just working around the real problem. > >> > >> Some other info: > >> > >> There is some info in the trace log: > >> 06-13 01:09:38 pageStore: Transaction log could not be truncated; > >> size: 16 MB > >> So - on to my questions :) > >> > >> And saving the best for last: > >> > >> The issue only happens on one of the 2 test machines we are using, one > >> is a Solaris X86 box which has no issues the other is a RHL x86 box > >> that is showing the issue. The DB file size on the problem box is > >> just under 500MB while the healthy one is 71 MB. This isn't really > >> comparing like with like because the healthy box has had more tests > >> run on it because it didn't fail early but its definitley worth > >> mentioning. The log entries on both boxes have the same "cant > >> truncate the transaction log" errors. > >> > >> I'm not aware of any client differences caused by the different envs > >> and while there is some C code in play here all the code I suspect > >> (all the inserting clients and the host process itself) is all java. > >> > >> Both systems are using local hard disks for the DB and the connection > >> string we are using is: > >> > >> jdbc:h2:tcp://host:port//file > >> path;AUTO_RECONNECT=TRUE;MVCC=TRUE;JMX=TRUE;LOCK_TIMEOUT=10000; > >> > >> > >> Has anyone any idea how to fix the missing lob issue or what kind of > >> application behaviour might be causing the problem? This code is from > >> a very large project being ported over from Oracle so we are certain > >> it works but obviously there need to be a few more changes made. > >> > >> In addition to this - from a H2 perspective it might be worth > >> considering changing the error message a little, the JVM is definitley > >> not shutting down in the above case and afaik the connection has not > >> been closed by the application although I havn't had a chance to 100% > >> confirm that. > >> > >> If you made it this far - thanks for reading :) > >> > > > > -- > > 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. > > > > -- > 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. > -- 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.
