You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by 刑天 <ga...@163.com> on 2019/06/05 07:32:36 UTC

Why QueryExecution blocks when another QueryExecution not close?

I forgot to close a QueryExecution, then when I create another one, and execute it, it has blocked. I know my code is wrong, but I want to know why it is wrong?

Re: Why QueryExecution blocks when another QueryExecution not close?

Posted by Rob Vesse <rv...@dotnetrdf.org>.
Well you don't specify what kind of QueryExecution you use but given the described behaviour I assume you are querying a SPARQL service via HTTP

Jena uses Apache HTTP Client as our HTTP Client library which uses a connection pool with a maximum number of simultaneous connections to a given route i.e. domain name.  Therefore if you fail to close query executions you are leaving HTTP connections open which can lead to blocking new requests from proceeding because there are no free connections in the pool.

Rob

On 05/06/2019, 08:33, "刑天" <ga...@163.com> wrote:

    I forgot to close a QueryExecution, then when I create another one, and execute it, it has blocked. I know my code is wrong, but I want to know why it is wrong?