I am seeing the following error, and just wondering around the cause for it.
com.complexible.stardog.StardogException: An error occurred adding RDF to the index: No space left on device
at com.complexible.stardog.protocols.client.SPECClientUtil.toStardogException(SPECClientUtil.java:65) ~[client-2.1.1.jar:na]
at com.complexible.stardog.protocols.snarl.client.SNARLConnection.applyChanges(SNARLConnection.java:314) ~[client-2.1.1.jar:na]
at com.complexible.stardog.api.impl.AbstractConnection.pushOutstanding(AbstractConnection.java:298) ~[api-2.1.1.jar:na]
at com.complexible.stardog.api.impl.AbstractConnection.commit(AbstractConnection.java:207) ~[api-2.1.1.jar:na]
at abbvie.gprd.emr.db.stardog.AdLoader.load(AdLoader.java:161) [classes/:na]
at abbvie.gprd.emr.db.stardog.AdLoader.main(AdLoader.java:94) [classes/:na]
Caused by: com.complexible.common.protocols.client.ClientException: An error occurred adding RDF to the index: No space left on device
at com.complexible.common.protocols.client.rpc.DefaultRPCClient.get(DefaultRPCClient.java:335) ~[client-2.1.1.jar:na]
at com.complexible.common.protocols.client.rpc.DefaultRPCClient.execute(DefaultRPCClient.java:312) ~[client-2.1.1.jar:na]
at com.complexible.stardog.protocols.snarl.client.SNARLClientImpl.add(SNARLClientImpl.java:281) ~[client-2.1.1.jar:na]
at com.complexible.stardog.protocols.snarl.client.SNARLClientImpl.add(SNARLClientImpl.java:53) ~[client-2.1.1.jar:na]
at com.complexible.stardog.protocols.snarl.client.SNARLConnection.change(SNARLConnection.java:321) ~[client-2.1.1.jar:na]
at com.complexible.stardog.protocols.snarl.client.SNARLConnection.applyChanges(SNARLConnection.java:298) ~[client-2.1.1.jar:na]
... 4 common frames omitted
com.complexible.stardog.db.DatabaseException: An error occurred adding RDF to the index: No space left on device
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.7.0_09]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[na:1.7.0_09]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.7.0_09]
at java.lang.reflect.Constructor.newInstance(Constructor.java:525) ~[na:1.7.0_09]
at com.complexible.stardog.protocols.snarl.SNARLThrowableCodec.decode(SNARLThrowableCodec.java:123) ~[shared-2.1.1.jar:na]
at com.complexible.barc.BigPacketCodec.toException(BigPacketCodec.java:267) ~[shared-2.1.1.jar:na]
at com.complexible.barc.BigPacketCodec.decode(BigPacketCodec.java:239) ~[shared-2.1.1.jar:na]
at com.complexible.barc.BigPacketDecoder.channelRead(BigPacketDecoder.java:75) ~[shared-2.1.1.jar:na]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) ~[netty-all-4.0.14.Final.jar:4.0.14.Final]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) ~[netty-all-4.0.14.Final.jar:4.0.14.Final]
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[netty-all-4.0.14.Final.jar:4.0.14.Final]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) ~[netty-all-4.0.14.Final.jar:4.0.14.Final]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) ~[netty-all-4.0.14.Final.jar:4.0.14.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:153) ~[netty-all-4.0.14.Final.jar:4.0.14.Final]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) ~[netty-all-4.0.14.Final.jar:4.0.14.Final]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) ~[netty-all-4.0.14.Final.jar:4.0.14.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[netty-all-4.0.14.Final.jar:4.0.14.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:126) ~[netty-all-4.0.14.Final.jar:4.0.14.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:485) ~[netty-all-4.0.14.Final.jar:4.0.14.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:452) ~[netty-all-4.0.14.Final.jar:4.0.14.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:346) ~[netty-all-4.0.14.Final.jar:4.0.14.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) ~[netty-all-4.0.14.Final.jar:4.0.14.Final]
at java.lang.Thread.run(Thread.java:722) ~[na:1.7.0_09]
This is occurring on a Connection.commit() call. This was after a Connection().add().graph() where the graph had about 2,000,000 statements. The statement was followed by another Connection.add().statement(). The Connection.remove() line is not getting called in this specific case.
// add the new updated records
conn.add().graph(newGraph, adContextUri);
// update the modification date
if (lastModificationDateStmt != null) {
// remove old date
conn.remove().statement(lastModificationDateStmt);
}
// add new date
conn.add().statement(adContextUri, IInfrastructureSchema.hasModificationDate, factory.createLiteral(cal.getTime()), adContextUri);
conn.commit();
I thought I would break down the graph into 10,000 statement chunks. So I broke it down into smaller graphs and committed after each chunk. I got the same error after getting to the final Connection.commit() line. If I comment out the code that adds the 2,000,000 statements, then it works fine. And then after that, if I put back in the code, but have smaller chunks to commit(), then it all works fine. I have not played around with it to see what number of statements causes this to happen. But because I tried it earlier with the commits every 10,000 statements, I assume it might be something under 10,000. But maybe it is just a combination of factors that is causing this to happen. I am sure that before I had no issues committing the 2,000,000 statements. But the addition of the additional add statement seems to have caused issues. I will remove the final add, and see if I get the same results.