You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Luigi Asprino <lu...@gmail.com> on 2018/11/12 19:28:00 UTC

Problems in querying Fuseki2 programmatically

Hi,

I have the following problem in querying a dataset created on a Fuseki2 server.
I have downloaded Apache Jena Fuseki 3.9.0 from this page [1], then I have created a dataset and uploaded some RDF files (I used the default configuration).
I tried submit some queries to the endpoint programmatically.
The endpoint promptly replies the first five queries, whereas the sixth query waits endlessly.
This does not depend on the submitted query (I was able to get the result of the same query from the web interface) and changing the order of the query submitted to the endpoint does not change the result.
It seems that there is something that limits the number of queries processed by the endpoint.

Cheers,
Luigi Asprino

[1] https://jena.apache.org/download/index.cgi <https://jena.apache.org/download/index.cgi>





Re: Problems in querying Fuseki2 programmatically

Posted by Andy Seaborne <an...@apache.org>.

On 12/11/2018 21:58, Luigi Asprino wrote:
> Thanks a lot!!!
> Now it works.

Good!

What's happening is the connections to a specific route (host) are 
pooled to avoid the full open cost each time.  That does assume that 
things go back into the pool which is what QueryExecution.close does on 
a remote connection.

     Andy

> 
> Luigi
> 
> 
> 
>> On 12 Nov 2018, at 22:29, Andy Seaborne <an...@apache.org> wrote:
>>
>> This could be:
>>
>> https://stackoverflow.com/questions/53099784/fuseki-blocks-after-5-requests?noredirect=1#comment93129379_53099784
>>
>> need to close the query execution
>>
>> try ( QueryExecution qexec = conn.query(pss.asQuery()) ) {
>> ...
>> }
>>
>> same for qexec2
>>
>>     Andy
>>
>> On 12/11/2018 20:30, Luigi Asprino wrote:
>>> Sorry,
>>> https://pastebin.com/2hixT9Au
>>> Luigi
>>>> On 12 Nov 2018, at 20:55, ajs6f <aj...@apache.org> wrote:
>>>>
>>>> This list doesn't accept attachments. You can cut-and-paste your material (if it's reasonably short) or use a service like gist or pastebin to make them available.
>>>>
>>>>
>>>> ajs6f
>>>>
>>>>> On Nov 12, 2018, at 2:46 PM, Luigi Asprino <lu...@gmail.com> wrote:
>>>>>
>>>>> Hi,
>>>>> thanks for the quick reply.
>>>>>
>>>>> The queries I submitted are embedded in the attached script.
>>>>> The script binds the variable f of the query with data loaded from a file and the binds the variables f and wn30 with results of the first query.
>>>>> I have tried both TDB and TDB2 with the same results.
>>>>>
>>>>> Thank you
>>>>>
>>>>> Luigi
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> On 12 Nov 2018, at 20:37, ajs6f@apache.org wrote:
>>>>>>
>>>>>> Please show us your queries, show us how you submitted them to the
>>>>>> endpoint, and give us at least some idea of what you used for data. Fuseki
>>>>>> is not by default limited in the way you described. In fact, there is no
>>>>>> obvious way to create that limitation and the web form just uses the
>>>>>> endpoint itself.
>>>>>>
>>>>>> ajs6f
>>>>>>
>>>>>> On Mon, Nov 12, 2018, 2:34 PM Luigi Asprino <luigi.asprino@gmail.com wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I have the following problem in querying a dataset created on a Fuseki2
>>>>>>> server.
>>>>>>> I have downloaded Apache Jena Fuseki 3.9.0 from this page [1], then I have
>>>>>>> created a dataset and uploaded some RDF files (I used the default
>>>>>>> configuration).
>>>>>>> I tried submit some queries to the endpoint programmatically.
>>>>>>> The endpoint promptly replies the first five queries, whereas the sixth
>>>>>>> query waits endlessly.
>>>>>>> This does not depend on the submitted query (I was able to get the result
>>>>>>> of the same query from the web interface) and changing the order of the
>>>>>>> query submitted to the endpoint does not change the result.
>>>>>>> It seems that there is something that limits the number of queries
>>>>>>> processed by the endpoint.
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Luigi Asprino
>>>>>>>
>>>>>>> [1] https://jena.apache.org/download/index.cgi <
>>>>>>> https://jena.apache.org/download/index.cgi>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>
> 

Re: Problems in querying Fuseki2 programmatically

Posted by Luigi Asprino <lu...@gmail.com>.
Thanks a lot!!!
Now it works.

Luigi



> On 12 Nov 2018, at 22:29, Andy Seaborne <an...@apache.org> wrote:
> 
> This could be:
> 
> https://stackoverflow.com/questions/53099784/fuseki-blocks-after-5-requests?noredirect=1#comment93129379_53099784
> 
> need to close the query execution
> 
> try ( QueryExecution qexec = conn.query(pss.asQuery()) ) {
> ...
> }
> 
> same for qexec2
> 
>    Andy
> 
> On 12/11/2018 20:30, Luigi Asprino wrote:
>> Sorry,
>> https://pastebin.com/2hixT9Au
>> Luigi
>>> On 12 Nov 2018, at 20:55, ajs6f <aj...@apache.org> wrote:
>>> 
>>> This list doesn't accept attachments. You can cut-and-paste your material (if it's reasonably short) or use a service like gist or pastebin to make them available.
>>> 
>>> 
>>> ajs6f
>>> 
>>>> On Nov 12, 2018, at 2:46 PM, Luigi Asprino <lu...@gmail.com> wrote:
>>>> 
>>>> Hi,
>>>> thanks for the quick reply.
>>>> 
>>>> The queries I submitted are embedded in the attached script.
>>>> The script binds the variable f of the query with data loaded from a file and the binds the variables f and wn30 with results of the first query.
>>>> I have tried both TDB and TDB2 with the same results.
>>>> 
>>>> Thank you
>>>> 
>>>> Luigi
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>>> On 12 Nov 2018, at 20:37, ajs6f@apache.org wrote:
>>>>> 
>>>>> Please show us your queries, show us how you submitted them to the
>>>>> endpoint, and give us at least some idea of what you used for data. Fuseki
>>>>> is not by default limited in the way you described. In fact, there is no
>>>>> obvious way to create that limitation and the web form just uses the
>>>>> endpoint itself.
>>>>> 
>>>>> ajs6f
>>>>> 
>>>>> On Mon, Nov 12, 2018, 2:34 PM Luigi Asprino <luigi.asprino@gmail.com wrote:
>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> I have the following problem in querying a dataset created on a Fuseki2
>>>>>> server.
>>>>>> I have downloaded Apache Jena Fuseki 3.9.0 from this page [1], then I have
>>>>>> created a dataset and uploaded some RDF files (I used the default
>>>>>> configuration).
>>>>>> I tried submit some queries to the endpoint programmatically.
>>>>>> The endpoint promptly replies the first five queries, whereas the sixth
>>>>>> query waits endlessly.
>>>>>> This does not depend on the submitted query (I was able to get the result
>>>>>> of the same query from the web interface) and changing the order of the
>>>>>> query submitted to the endpoint does not change the result.
>>>>>> It seems that there is something that limits the number of queries
>>>>>> processed by the endpoint.
>>>>>> 
>>>>>> Cheers,
>>>>>> Luigi Asprino
>>>>>> 
>>>>>> [1] https://jena.apache.org/download/index.cgi <
>>>>>> https://jena.apache.org/download/index.cgi>
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>> 
>>> 


Re: Problems in querying Fuseki2 programmatically

Posted by Andy Seaborne <an...@apache.org>.
This could be:

https://stackoverflow.com/questions/53099784/fuseki-blocks-after-5-requests?noredirect=1#comment93129379_53099784

need to close the query execution

try ( QueryExecution qexec = conn.query(pss.asQuery()) ) {
...
}

same for qexec2

     Andy

On 12/11/2018 20:30, Luigi Asprino wrote:
> Sorry,
> https://pastebin.com/2hixT9Au
> 
> Luigi
> 
> 
>> On 12 Nov 2018, at 20:55, ajs6f <aj...@apache.org> wrote:
>>
>> This list doesn't accept attachments. You can cut-and-paste your material (if it's reasonably short) or use a service like gist or pastebin to make them available.
>>
>>
>> ajs6f
>>
>>> On Nov 12, 2018, at 2:46 PM, Luigi Asprino <lu...@gmail.com> wrote:
>>>
>>> Hi,
>>> thanks for the quick reply.
>>>
>>> The queries I submitted are embedded in the attached script.
>>> The script binds the variable f of the query with data loaded from a file and the binds the variables f and wn30 with results of the first query.
>>> I have tried both TDB and TDB2 with the same results.
>>>
>>> Thank you
>>>
>>> Luigi
>>>
>>>
>>>
>>>
>>>
>>>
>>>> On 12 Nov 2018, at 20:37, ajs6f@apache.org wrote:
>>>>
>>>> Please show us your queries, show us how you submitted them to the
>>>> endpoint, and give us at least some idea of what you used for data. Fuseki
>>>> is not by default limited in the way you described. In fact, there is no
>>>> obvious way to create that limitation and the web form just uses the
>>>> endpoint itself.
>>>>
>>>> ajs6f
>>>>
>>>> On Mon, Nov 12, 2018, 2:34 PM Luigi Asprino <luigi.asprino@gmail.com wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I have the following problem in querying a dataset created on a Fuseki2
>>>>> server.
>>>>> I have downloaded Apache Jena Fuseki 3.9.0 from this page [1], then I have
>>>>> created a dataset and uploaded some RDF files (I used the default
>>>>> configuration).
>>>>> I tried submit some queries to the endpoint programmatically.
>>>>> The endpoint promptly replies the first five queries, whereas the sixth
>>>>> query waits endlessly.
>>>>> This does not depend on the submitted query (I was able to get the result
>>>>> of the same query from the web interface) and changing the order of the
>>>>> query submitted to the endpoint does not change the result.
>>>>> It seems that there is something that limits the number of queries
>>>>> processed by the endpoint.
>>>>>
>>>>> Cheers,
>>>>> Luigi Asprino
>>>>>
>>>>> [1] https://jena.apache.org/download/index.cgi <
>>>>> https://jena.apache.org/download/index.cgi>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>
> 
> 

Re: Problems in querying Fuseki2 programmatically

Posted by Luigi Asprino <lu...@gmail.com>.
Sorry,
https://pastebin.com/2hixT9Au

Luigi


> On 12 Nov 2018, at 20:55, ajs6f <aj...@apache.org> wrote:
> 
> This list doesn't accept attachments. You can cut-and-paste your material (if it's reasonably short) or use a service like gist or pastebin to make them available.
> 
> 
> ajs6f
> 
>> On Nov 12, 2018, at 2:46 PM, Luigi Asprino <lu...@gmail.com> wrote:
>> 
>> Hi,
>> thanks for the quick reply.
>> 
>> The queries I submitted are embedded in the attached script.
>> The script binds the variable f of the query with data loaded from a file and the binds the variables f and wn30 with results of the first query.
>> I have tried both TDB and TDB2 with the same results.
>> 
>> Thank you
>> 
>> Luigi
>> 
>> 
>> 
>> 
>> 
>> 
>>> On 12 Nov 2018, at 20:37, ajs6f@apache.org wrote:
>>> 
>>> Please show us your queries, show us how you submitted them to the
>>> endpoint, and give us at least some idea of what you used for data. Fuseki
>>> is not by default limited in the way you described. In fact, there is no
>>> obvious way to create that limitation and the web form just uses the
>>> endpoint itself.
>>> 
>>> ajs6f
>>> 
>>> On Mon, Nov 12, 2018, 2:34 PM Luigi Asprino <luigi.asprino@gmail.com wrote:
>>> 
>>>> Hi,
>>>> 
>>>> I have the following problem in querying a dataset created on a Fuseki2
>>>> server.
>>>> I have downloaded Apache Jena Fuseki 3.9.0 from this page [1], then I have
>>>> created a dataset and uploaded some RDF files (I used the default
>>>> configuration).
>>>> I tried submit some queries to the endpoint programmatically.
>>>> The endpoint promptly replies the first five queries, whereas the sixth
>>>> query waits endlessly.
>>>> This does not depend on the submitted query (I was able to get the result
>>>> of the same query from the web interface) and changing the order of the
>>>> query submitted to the endpoint does not change the result.
>>>> It seems that there is something that limits the number of queries
>>>> processed by the endpoint.
>>>> 
>>>> Cheers,
>>>> Luigi Asprino
>>>> 
>>>> [1] https://jena.apache.org/download/index.cgi <
>>>> https://jena.apache.org/download/index.cgi>
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>> 
> 


Re: Problems in querying Fuseki2 programmatically

Posted by ajs6f <aj...@apache.org>.
This list doesn't accept attachments. You can cut-and-paste your material (if it's reasonably short) or use a service like gist or pastebin to make them available.


ajs6f

> On Nov 12, 2018, at 2:46 PM, Luigi Asprino <lu...@gmail.com> wrote:
> 
> Hi,
> thanks for the quick reply.
> 
> The queries I submitted are embedded in the attached script.
> The script binds the variable f of the query with data loaded from a file and the binds the variables f and wn30 with results of the first query.
> I have tried both TDB and TDB2 with the same results.
> 
> Thank you
> 
> Luigi
> 
> 
> 
> 
> 
> 
>> On 12 Nov 2018, at 20:37, ajs6f@apache.org wrote:
>> 
>> Please show us your queries, show us how you submitted them to the
>> endpoint, and give us at least some idea of what you used for data. Fuseki
>> is not by default limited in the way you described. In fact, there is no
>> obvious way to create that limitation and the web form just uses the
>> endpoint itself.
>> 
>> ajs6f
>> 
>> On Mon, Nov 12, 2018, 2:34 PM Luigi Asprino <luigi.asprino@gmail.com wrote:
>> 
>>> Hi,
>>> 
>>> I have the following problem in querying a dataset created on a Fuseki2
>>> server.
>>> I have downloaded Apache Jena Fuseki 3.9.0 from this page [1], then I have
>>> created a dataset and uploaded some RDF files (I used the default
>>> configuration).
>>> I tried submit some queries to the endpoint programmatically.
>>> The endpoint promptly replies the first five queries, whereas the sixth
>>> query waits endlessly.
>>> This does not depend on the submitted query (I was able to get the result
>>> of the same query from the web interface) and changing the order of the
>>> query submitted to the endpoint does not change the result.
>>> It seems that there is something that limits the number of queries
>>> processed by the endpoint.
>>> 
>>> Cheers,
>>> Luigi Asprino
>>> 
>>> [1] https://jena.apache.org/download/index.cgi <
>>> https://jena.apache.org/download/index.cgi>
>>> 
>>> 
>>> 
>>> 
>>> 
> 


Re: Problems in querying Fuseki2 programmatically

Posted by Luigi Asprino <lu...@gmail.com>.
Hi,
thanks for the quick reply.

The queries I submitted are embedded in the attached script.
The script binds the variable f of the query with data loaded from a file and the binds the variables f and wn30 with results of the first query.
I have tried both TDB and TDB2 with the same results.

Thank you

Luigi


Re: Problems in querying Fuseki2 programmatically

Posted by aj...@apache.org.
Please show us your queries, show us how you submitted them to the
endpoint, and give us at least some idea of what you used for data. Fuseki
is not by default limited in the way you described. In fact, there is no
obvious way to create that limitation and the web form just uses the
endpoint itself.

ajs6f

On Mon, Nov 12, 2018, 2:34 PM Luigi Asprino <luigi.asprino@gmail.com wrote:

> Hi,
>
> I have the following problem in querying a dataset created on a Fuseki2
> server.
> I have downloaded Apache Jena Fuseki 3.9.0 from this page [1], then I have
> created a dataset and uploaded some RDF files (I used the default
> configuration).
> I tried submit some queries to the endpoint programmatically.
> The endpoint promptly replies the first five queries, whereas the sixth
> query waits endlessly.
> This does not depend on the submitted query (I was able to get the result
> of the same query from the web interface) and changing the order of the
> query submitted to the endpoint does not change the result.
> It seems that there is something that limits the number of queries
> processed by the endpoint.
>
> Cheers,
> Luigi Asprino
>
> [1] https://jena.apache.org/download/index.cgi <
> https://jena.apache.org/download/index.cgi>
>
>
>
>
>