0

When posting a correct big Sparql-File ( containing deletes and updates) using curl,

 curl -X POST --data-binary @hashtag.sparql -H "Accept: application/rdf+xml" -H "Content-type: application/sparql-update"  http://localhost:7200/repositories/test/statements

i get the following error message

Handler dispatch failed; nested exception is java.lang.StackOverflowError

and the log files contain

at org.eclipse.rdf4j.query.parser.sparql.ast.SyntaxTreeBuilder.UpdateSequence(SyntaxTreeBuilder.java:116)

Is this something i can fix somehow or is this a bug in GraphDB?

Only X
  • 37
  • 1
  • 6
  • Can you briefly comment on _how_ large exactly your big update file is? Specifically what I'm interested in is how many individual update operations the sequence contains. – Jeen Broekstra Sep 12 '21 at 03:15

1 Answers1

2

This is a problem in the RDF4J SPARQL parser used by GraphDB, which uses a recursive call to parse update sequences. Apparently, your update sequence is too large for the default JVM stack on your system.

You can work around this by configuring you JVM to use a larger stack (e.g. -Xss:512k or whatever size you find you need), or alternatively by splitting your big update file into two.

The root cause will need a fix in the SPARQL parser though. I've logged a bug report for this issue with that in mind: https://github.com/eclipse/rdf4j/issues/3328 .

Jeen Broekstra
  • 21,642
  • 4
  • 51
  • 73