Stardog Connection.commit() raising java.nio.channels.ClosedChannelException

StackOverflow https://stackoverflow.com/questions/23552010

  •  18-07-2023
  •  | 
  •  

Question

I am trying to add statements to a stardog connection using a connection pool. For some reason about halfway through data ingest, I get a ClosedChannelConnectionException when I try to commit.

// This all runs in a loop
while ... {
  def conn = connPool.obtain()
  conn.begin()

  // Add some statements here
  conn.add()...

  conn.commit() // This line throws the exception

  connPool.release(conn)
}

The exception is:

com.complexible.stardog.StardogException: java.nio.channels.ClosedChannelException

After the exception, the stardog server crashes, but there are no errors in the logs. When I restart the server, the database I was using is offline and I have to recreate it to use it.

I am using Stardog 2.1 Community Edition.

Can anyone help with this? Thanks!

Était-ce utile?

La solution 2

I was running an in-memory database and the server was crashing because the machine ran out of memory.

Autres conseils

The ChannelClosedException is a bit of a red herring; if the server is going down, that's why the channel is closed.

Why not simply bring the database back online rather than re-creating it? Does the error happen with the same data each time?

I recommend you post this on the Stardog mailing list with a complete example that reproduces the issue.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top