One other thing - we are setting 2 proerties before we start the server
inside the host process:
System.setProperty("h2.serverCachedObjects", 20000);
System.setProperty("h2.serverResultSetFetchSize", 40000);
This was in response to something we saw in a changelog that seemed like it
might be related
On Wednesday, June 13, 2012 7:33:50 AM UTC+1, 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 view this discussion on the web visit
https://groups.google.com/d/msg/h2-database/-/aD6O6Wn9Xq0J.
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.