blazegraph / database

Blazegraph High Performance Graph Database
GNU General Public License v2.0
898 stars 173 forks source link

Overflow Error when Uploading Data #194

Closed shadefc09 closed 3 years ago

shadefc09 commented 3 years ago

I'm trying to upload a large amount of data and keep getting a StackOverflowError. I ommitted the many repeated lines containing at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.UpdateSequence(SyntaxTreeBuilder.java:120) below and replaced them with .... I also removed the names of the local classes in the log.

I'm uploading the data from a local application using the SPARQL endpoint on bigdata.jar. I have the following startup parameters:

java -server -Xmx80g \
-Djetty.port=8082 \
-Dbigdata.propertyFile=/data/blazegraph/properties/blazegraph.properties \
-Djetty.overrideWebXml=/data/blazegraph/properties/blazegraph.xml \
-Dlog4j.configuration=file:/data/blazegraph/properties/blazegraph-log.properties \
-Dorg.eclipse.jetty.server.Request.maxFormContentSize=1000000000 \
-jar /data/blazegraph/java/bigdata.jar &

The only changes in the properties is the standard changes mentioned in the installation guide and maybe increased the size of the threadpools. Other than that, the instance is pretty much setup the way it came. Any ideas for the StackOverflowError? Would ulimit -s possibly help?

java.util.concurrent.ExecutionException: java.lang.StackOverflowError
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:294)
        at com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlUpdate(QueryServlet.java:460)
        at com.bigdata.rdf.sail.webapp.QueryServlet.doPost(QueryServlet.java:241)
        at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:269)
        at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:195)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1340)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1242)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:220)
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
        at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
        at org.eclipse.jetty.server.Server.handle(Server.java:503)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.StackOverflowError
        at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.jjMoveNfa_0(SyntaxTreeBuilderTokenManager.java:2579)
        at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.jjMoveStringLiteralDfa5_0(SyntaxTreeBuilderTokenManager.java:1545)
        at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.jjMoveStringLiteralDfa4_0(SyntaxTreeBuilderTokenManager.java:1014)
        at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.jjMoveStringLiteralDfa3_0(SyntaxTreeBuilderTokenManager.java:766)
        at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.jjMoveStringLiteralDfa2_0(SyntaxTreeBuilderTokenManager.java:417)
        at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.jjMoveStringLiteralDfa1_0(SyntaxTreeBuilderTokenManager.java:278)
        at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.jjMoveStringLiteralDfa0_0(SyntaxTreeBuilderTokenManager.java:91)
        at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.getNextToken(SyntaxTreeBuilderTokenManager.java:3948)
        at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.getToken(SyntaxTreeBuilder.java:9626)
        at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.readToMatchingBrace(SyntaxTreeBuilder.java:70)
        at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.UnparsedQuadDataBlock(SyntaxTreeBuilder.java:7699)
        at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.InsertData(SyntaxTreeBuilder.java:8368)
        at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.Update(SyntaxTreeBuilder.java:7902)
        at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.UpdateContainer(SyntaxTreeBuilder.java:174)
        at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.UpdateSequence(SyntaxTreeBuilder.java:116)
        at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.UpdateSequence(SyntaxTreeBuilder.java:120)
        at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.UpdateSequence(SyntaxTreeBuilder.java:120)
        ...
        at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.UpdateSequence(SyntaxTreeBuilder.java:120)
        at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.UpdateSequence(SyntaxTreeBuilder.java:120)
        at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.UpdateSequence(SyntaxTreeBuilder.java:120)
ERROR 02.23.2021 15:24:26,059 <local_class>$5:487 error executing transaction
org.eclipse.rdf4j.repository.RepositoryException: error executing transaction
        at org.eclipse.rdf4j.repository.sparql.SPARQLConnection.commit(SPARQLConnection.java:438)
        <localClasses>
Caused by: org.eclipse.rdf4j.query.UpdateExecutionException: SPARQL-UPDATE: updateStr=INSERT DATA
thompsonbry commented 3 years ago

Are you using INSERT or INSERT DATA? The latter defers parsing and is more scalable.

Bryan

On Wed, Feb 24, 2021 at 06:58 shadefc09 notifications@github.com wrote:

I'm trying to upload a large amount of data and keep getting a StackOverflowError. I ommitted the many repeated lines containing at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.UpdateSequence(SyntaxTreeBuilder.java:120) below and replaced them with .... I also removed the names of the local classes in the log.

I'm uploading the data from a local application using the SPARQL endpoint on bigdata.jar. I have the following startup parameters:

java -server -Xmx80g \ -Djetty.port=8082 \ -Dbigdata.propertyFile=/data/blazegraph/properties/blazegraph.properties \ -Djetty.overrideWebXml=/data/blazegraph/properties/blazegraph.xml \ -Dlog4j.configuration=file:/data/blazegraph/properties/blazegraph-log.properties \ -Dorg.eclipse.jetty.server.Request.maxFormContentSize=1000000000 \ -jar /data/blazegraph/java/bigdata.jar &

The only changes in the properties is the standard changes mentioned in the installation guide and maybe increased the size of the threadpools. Other than that, the instance is pretty much setup the way it came. Any ideas for the StackOverflowError? Would ulimit -s possibly help?

java.util.concurrent.ExecutionException: java.lang.StackOverflowError at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:294) at com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlUpdate(QueryServlet.java:460) at com.bigdata.rdf.sail.webapp.QueryServlet.doPost(QueryServlet.java:241) at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:269) at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:195) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1340) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1242) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:220) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:503) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.StackOverflowError at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.jjMoveNfa_0(SyntaxTreeBuilderTokenManager.java:2579) at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.jjMoveStringLiteralDfa5_0(SyntaxTreeBuilderTokenManager.java:1545) at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.jjMoveStringLiteralDfa4_0(SyntaxTreeBuilderTokenManager.java:1014) at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.jjMoveStringLiteralDfa3_0(SyntaxTreeBuilderTokenManager.java:766) at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.jjMoveStringLiteralDfa2_0(SyntaxTreeBuilderTokenManager.java:417) at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.jjMoveStringLiteralDfa1_0(SyntaxTreeBuilderTokenManager.java:278) at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.jjMoveStringLiteralDfa0_0(SyntaxTreeBuilderTokenManager.java:91) at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.getNextToken(SyntaxTreeBuilderTokenManager.java:3948) at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.getToken(SyntaxTreeBuilder.java:9626) at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.readToMatchingBrace(SyntaxTreeBuilder.java:70) at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.UnparsedQuadDataBlock(SyntaxTreeBuilder.java:7699) at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.InsertData(SyntaxTreeBuilder.java:8368) at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.Update(SyntaxTreeBuilder.java:7902) at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.UpdateContainer(SyntaxTreeBuilder.java:174) at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.UpdateSequence(SyntaxTreeBuilder.java:116) at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.UpdateSequence(SyntaxTreeBuilder.java:120) at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.UpdateSequence(SyntaxTreeBuilder.java:120) ... at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.UpdateSequence(SyntaxTreeBuilder.java:120) at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.UpdateSequence(SyntaxTreeBuilder.java:120) at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.UpdateSequence(SyntaxTreeBuilder.java:120) ERROR 02.23.2021 15:24:26,059 $5:487 error executing transaction org.eclipse.rdf4j.repository.RepositoryException: error executing transaction at org.eclipse.rdf4j.repository.sparql.SPARQLConnection.commit(SPARQLConnection.java:438)

Caused by: org.eclipse.rdf4j.query.UpdateExecutionException: SPARQL-UPDATE: updateStr=INSERT DATA — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub , or unsubscribe .
shadefc09 commented 3 years ago

I'm honestly not sure. I'm using RDF4J's SPARQLRepository.add() method. I can try to look into which that is using. Thanks for the tip!