IO Exception: "java.io.IOException: Stream Closed"; [90031-168]

791 views
Skip to first unread message

Tomasz Chmielewski

unread,
Jul 5, 2014, 2:22:39 PM7/5/14
to h2-da...@googlegroups.com
I'm using eclipse PDT, which uses H2 DB for indexing data. there are problems with accesing db - indexing a single file takes ages, and it makes using eclipse literally impossible.
after printing model.trace.db i found hundreds of logs like this:

07-04 23:21:06 database: flush
org.h2.message.DbException: Polaczenie nie zostalo zamkniete [Connection has not been closed]
IO Exception: "java.io.IOException: Stream Closed"; "Y:/.metadata/.plugins/org.eclipse.dltk.core.index.sql.h2/model.h2.db" [90031-168]
at org.h2.message.DbException.get(DbException.java:158)
at org.h2.message.DbException.convertIOException(DbException.java:315)
at org.h2.store.FileStore.write(FileStore.java:330)
at org.h2.store.PageStore.writePage(PageStore.java:1327)
at org.h2.store.PageStreamData.write(PageStreamData.java:105)
at org.h2.store.PageOutputStream.storePage(PageOutputStream.java:146)
at org.h2.store.PageOutputStream.flush(PageOutputStream.java:154)
at org.h2.store.PageLog.flushOut(PageLog.java:856)
at org.h2.store.PageLog.flush(PageLog.java:663)
at org.h2.store.PageStore.flushLog(PageStore.java:986)
at org.h2.engine.Database.flush(Database.java:1780)
at org.h2.store.WriterThread.run(WriterThread.java:86)
at java.lang.Thread.run(Unknown Source)
Caused by: org.h2.jdbc.JdbcSQLException: Polaczenie nie zostalo zamkniete
IO Exception: "java.io.IOException: Stream Closed"; "Y:/.metadata/.plugins/org.eclipse.dltk.core.index.sql.h2/model.h2.db" [90031-168]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
... 13 more
Caused by: java.io.IOException: Stream Closed
at java.io.RandomAccessFile.writeBytes0(Native Method)
at java.io.RandomAccessFile.writeBytes(Unknown Source)
at java.io.RandomAccessFile.write(Unknown Source)
at org.h2.store.fs.FileDisk.write(FilePathDisk.java:438)
at org.h2.store.fs.FileUtils.writeFully(FileUtils.java:372)
at org.h2.store.FileStore.write(FileStore.java:327)
... 10 more

I run eclipse on windows 7, my workspace is a mapped network drive, sources are located on debian machine, shared through samba, and that's where the h2 *.db files are located.
Any clues what could be wrong or how to fix this? thanks in advance.

Noel Grandin

unread,
Jul 8, 2014, 2:37:08 AM7/8/14
to h2-da...@googlegroups.com


On 2014-07-05 08:22 PM, Tomasz Chmielewski wrote:
> I'm using eclipse PDT, which uses H2 DB for indexing data. there are problems with accesing db - indexing a single file
> takes ages, and it makes using eclipse literally impossible.

The exceptions are not serious, they are from a background thread. I believe we have fixed this bug already.

>
> I run eclipse on windows 7, my workspace is a mapped network drive, sources are located on debian machine, shared
> through samba, and that's where the h2 *.db files are located.
> Any clues what could be wrong or how to fix this? thanks in advance.

This is your problem - network drives are notorious for having highly variable latency, which can play havoc with
database performance.

Tomasz Chmielewski

unread,
Jul 8, 2014, 6:45:43 AM7/8/14
to h2-da...@googlegroups.com
Thank you Noel. This is what I suspected, but hoped there is some way to fix it or make it more stable.

Noel Grandin

unread,
Jul 8, 2014, 7:41:21 AM7/8/14
to h2-da...@googlegroups.com
You are could try playing with cache settings, that might help mask some of the latency.
> --
> You received this message because you are subscribed to the Google Groups "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> h2-database...@googlegroups.com <mailto:h2-database...@googlegroups.com>.
> To post to this group, send email to h2-da...@googlegroups.com <mailto:h2-da...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.

Tomasz Chmielewski

unread,
Jul 9, 2014, 9:22:54 AM7/9/14
to h2-da...@googlegroups.com
changing the environment from windows to linux (I run eclipse on debian now) fixed the problem. I mount external resources as a network share and don't experience described problems anymore


On Tuesday, July 8, 2014 1:41:21 PM UTC+2, Noel Grandin wrote:
You are could try playing with cache settings, that might help mask some of the latency.

On 2014-07-08 12:45 PM, Tomasz Chmielewski wrote:
> Thank you Noel. This is what I suspected, but hoped there is some way to fix it or make it more stable.
>
> On Tuesday, July 8, 2014 8:37:08 AM UTC+2, Noel Grandin wrote:
>
>
>
>     On 2014-07-05 08:22 PM, Tomasz Chmielewski wrote:
>      > I'm using eclipse PDT, which uses H2 DB for indexing data. there are problems with accesing db - indexing a
>     single file
>      > takes ages, and it makes using eclipse literally impossible.
>
>     The exceptions are not serious, they are from a background thread. I believe we have fixed this bug already.
>
>      >
>      > I run eclipse on windows 7, my workspace is a mapped network drive, sources are located on debian machine, shared
>      > through samba, and that's where the h2 *.db files are located.
>      > Any clues what could be wrong or how to fix this? thanks in advance.
>
>     This is your problem - network drives are notorious for having highly variable latency, which can play havoc with
>     database performance.
>
> --
> You received this message because you are subscribed to the Google Groups "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to

Thomas Mueller

unread,
Jul 9, 2014, 2:18:37 PM7/9/14
to H2 Google Group
Hi,

For write performance reasons, even for Linux, I would avoid keeping the database files on a network drive, for H2 version 1.3.x.

Version 1.4.x (the MVStore) should be be less problematic, as the number of write operations is much lower. It would be worth a try. The number of read operations is still high, but that might not be a problem (specially when using a large cache).

Regards,
Thomas



On Tue, Jul 8, 2014 at 1:41 PM, Noel Grandin <noelg...@gmail.com> wrote:
You are could try playing with cache settings, that might help mask some of the latency.


On 2014-07-08 12:45 PM, Tomasz Chmielewski wrote:
Thank you Noel. This is what I suspected, but hoped there is some way to fix it or make it more stable.

On Tuesday, July 8, 2014 8:37:08 AM UTC+2, Noel Grandin wrote:



    On 2014-07-05 08:22 PM, Tomasz Chmielewski wrote:
     > I'm using eclipse PDT, which uses H2 DB for indexing data. there are problems with accesing db - indexing a
    single file
     > takes ages, and it makes using eclipse literally impossible.

    The exceptions are not serious, they are from a background thread. I believe we have fixed this bug already.

     >
     > I run eclipse on windows 7, my workspace is a mapped network drive, sources are located on debian machine, shared
     > through samba, and that's where the h2 *.db files are located.
     > Any clues what could be wrong or how to fix this? thanks in advance.

    This is your problem - network drives are notorious for having highly variable latency, which can play havoc with
    database performance.

--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscribe@googlegroups.com.
To post to this group, send email to h2-da...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages