Jena uses Apache HttpClient which does place limits on the number of
connections - see 
https://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html
- specifically section 2.3

Additionally the remote server may place constraints on its services to
stop users abusing the service and affecting other users

You haven't told us much about what you actually do, if you run lots of
queries in parallel then you may be hitting rate/resource limits on either
the client or the remote server side.

It is also worth noting that calling execSelect() on a QueryExecution does
not close the connection automatically, it returns a ResultSet which will
stream the results returned by the remote server back to you on demand.
So every unclosed QueryExecution object you have obtained is holding a
HTTP connection open, you either need to process the results by iterating
and closing the associated QueryExecution or if you don't want to do the
processing immediately take an in-memory copy and close the QueryExecution
e.g.

ResultSet copy = ResultSetFactory.makeRewindable(qe.execSelect());
qe.close();

Rob

On 24/03/2015 04:27, "Arsham Mesbah" <[email protected]> wrote:

>No constraint but there is a timeout period, i.e if your query is takes a
>longtime to finish then it is going to time out and you will not receive a
>result. Does the query returns anything? Can your run the same query on an
>endpoint and limit the rows returned to some small # to make sure it
>returns something?
>
>On Mon, Mar 23, 2015 at 6:29 PM, Mauricio Orellana
><[email protected]>
>wrote:
>
>> Is there any constraint about requests number in apache jena?
>> I need to do a lot of requests from jena to an endpoint, but the process
>> never gets finished.
>>
>> The problem is in method execSelect() of class QueryExecution, when I
>>call
>> this method a lot of times, my program doesn't reciev more data.
>>
>> Thanks in advance.
>>
>
>
>
>-- 
>Arsham Mesbah
>University of Georgia
>Department of Computer Science
>Franklin College of Arts and Sciences
>415 Graduate Studies Research Center
>Athens, GA 30602




Reply via email to