[
https://issues.apache.org/jira/browse/JENA-1702?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rob Vesse resolved JENA-1702.
-----------------------------
Resolution: Duplicate
Fix Version/s: Jena 3.11.0
[~trueg][~ajs6f] This is a known bug (JENA-1657) that was only fixed a couple
of months ago by PR https://github.com/apache/jena/pull/520 so is present in
3.10.0 and prior versions
The fix will be included in the 3.11.0 release, if you are able to use a
SNAPSHOT build
(http://jena.apache.org/download/maven.html#specifying-dependencies-on-snapshots)
you should be able to verify that 3.11.0-SNAPSHOT does not have the issue
> InputStream for HTTP constructModel queries are not closed
> ----------------------------------------------------------
>
> Key: JENA-1702
> URL: https://issues.apache.org/jira/browse/JENA-1702
> Project: Apache Jena
> Issue Type: Bug
> Components: ARQ
> Affects Versions: Jena 3.10.0
> Reporter: Sebastian Trüg
> Priority: Major
> Fix For: Jena 3.11.0
>
>
> I am accessing a Fuseki installation as follows:
> {code:java}
> String uri = fusekiHost + "/" + dataset;
> RDFConnection conn = RDFConnectionFuseki.create().destination(uri).build();
> try(RDFConnection conn = createConnection(dataModelDs)) {
> Model model = conn.queryConstruct("construct { ?s ?p ?o . } where { ?s ?p
> ?o . }");
> return model;
> }{code}
> The problem is that after 5 of these requests the Spring boot application
> this code runs in blocks due to the PoolingHttpClientConnectionManager
> running out of free routes.
> After lots of debugging I noticed that the InputStream that is used to read
> the data is never closed.
> InputStreams from "select" requests are closed in QueryEngineHTTP::close due
> to "retainedConnection" being set.
> The same is not true for "construct" queries since their results are parsed
> via RDFDataMgr which does not close the InputStream.
> I do not understand the code well enough to propose a proper solution but
> maybe just setting "retainedConnection" for construct queries would be
> enough? Either way, I think the stream needs to be closed somehow.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)