Hello,

We’re facing an issue with Jena reading n-triples stream over HTTP. In fact, 
our application hangs entirely while executing this piece of code:


Model sub = ModelFactory.createDefaultModel();

TypedInputStream stream = HttpOp.execHttpGet(requestURL, 
WebContent.contentTypeNTriples, createHttpClient(auth), null)

// The following part sometimes hangs:
RDFParser.create()
        .source(stream)
        .lang(Lang.NTRIPLES)
        .errorHandler(ErrorHandlerFactory.errorHandlerStrict)
        .parse(sub.getGraph());
// This point is not reached

The issue is not persistent, moreover it happens infrequently. When it occurs, 
the RDF store server (we use Dydra for that) logs a successful HTTP 200 
response for our call (truncated for readability):
HTTP/1.1" 200 3072/55397664 10.676/10.828 "application/n-triples" "-" "-" 
"Apache-Jena-ARQ/3.17.0" "127.0.0.1:8104"

So it looks like the RDF store successfully executes the SPARQL query, responds 
with HTTP 200 and starts transferring the data with the chunked encoding. Then 
something goes wrong when Jena processes the input stream. I expect there might 
be some timeout behind the scenes while Jena reads the stream, and it causes it 
to wait indefinitely. At the same time ErrorHandlerFactory.errorHandlerStrict 
does not help at all – no errors are logged.

Is there a way to configure the timeout behavior for the underlying Jena logic 
of processing HTTP stream? Ideally we want to abort the request if it times out 
and then retry it a few times until it succeeds.

Met vriendelijke groet, with kind regards,

Ivan Lagunov
Technical Lead / Software Architect
Skype: lagivan

Semaku B.V.
Torenallee 20 (SFJ3D) • 5617 BC Eindhoven • www.semaku.com

Reply via email to