Hi Andy,

thank you so much for your detailled answer!

In the Fuseki UI with your test query, I get now the desired timeout error. 
(Though, I don't unterstand why Fuseki waits for the whole period of time 
stated within wait() instead of breaking up the executing after its timeout.)

Nevertheless, my own sample query executed via PHP still takes 50 seconds and 
doesn't end in a timeout error. From the Fuseki UI, it is quite faster. So, my 
real problem might be ARC2.

Thanks again for your help!

Christian

----------------------------------------
> Date: Mon, 11 May 2015 12:35:24 +0100
> From: [email protected]
> To: [email protected]
> Subject: Re: Fuseki as Web Application read configuration file
>
> Hi Christian,
>
> I've tried to recreate your setup but it's working for me for my
> understanding. The part I'm not completely sure about is how you have
> your TDB database is configured into tomcat. The full config file you
> showed (6/May) has the fuseki server setup:
>
> -----------------------------
> [] rdf:type fuseki:Server ;
>
> ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "4000" ] ;
>
> .
> -----------------------------
> so you are not putting any service definitions in that file.
>
> There is the problem I mentioned about a preset timeout of 3000ms when a
> Fuseki service is created via the UI. That can be fixed by editing the
> template/config-tdb file. You are not seeing that timeout.
>
> So for the Fuseki setup, how are you configuring your TDB database?
>
> My experiment:
> 1/ Stop tomcat, delete /etc/fuseki/*, start tomcat, stop tomcat.
>
> That gets a clean area setup.
>
>
> 2/ Fix template/config-tdb (remove the timeout line).
> 3/ Start tomcat, execute the query below via the UI. No timeout.
>
> 4/ Stop tomcat
> 5/ Edit /etc/fuseki/config.ttl, add a timeout of 1000.
>
> 6/ Start tomcat.
> 7/ Execute the query below via the UI.
>
> I get a timeout.
>
> I also tested with a complete configuration in /etc/fuseki/config.ttl
> (server and data service).
>
> I was deleting the files in /etc/fuseki/system/ each time to get a known
> clean server.
>
> By default, the fuseki log ends up in catalina.out - what does it say
> when the tomcat server is starting?
>
> How have you been putting the data service configuration into Fuseki?
>
> Andy
>
> PS A test query that does not require data: it waits 1.5s then 1s then
> 1s. Timeout tests happen after each BIND.
>
> PREFIX apf: <http://jena.hpl.hp.com/ARQ/property#>
> PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
>
> SELECT *
> WHERE {
> BIND (afn:wait(1500) AS ?X1)
> BIND (afn:wait(1000) AS ?X2)
> BIND (afn:wait(1000) AS ?X3)
> }
>
>
>
> On 09/05/15 12:04, Andy Seaborne wrote:
>> Hi Christian,
>>
>> Thank you for the details. It's not immediately obvious what is
>> happening. I'll try to recreate your setup on my machine.
>>
>> Andy
>>
>> On 07/05/15 17:56, Christian Schwaderer wrote:
>>> Hi Andy,
>>>
>>> thanks again!
>>>
>>> I'll try to give some details about my setup:
>>>
>>> I run a server with openSUSE 13.1/64 bit on wich Apache Tomcat 7.0.42
>>> runs. I have deployed Fuseki 2.0.0 simply by putting the file
>>> fuseki.war into /srv/tomcat/webapps/ (and started it from within the
>>> Tomcat Web Application Manager).
>>>
>>> My application is written in PHP, for SPARQL queries I use the ARC2
>>> library.
>>>
>>> On my local test machine, I've successfully set a timelimit in Fuseki.
>>> The database there was created with TDB (which is far less convenient
>>> than the Fuseki UI), I've started Fuseki with the parameter
>>> "--config=config.ttl". I then tested a very time consuming SPARQL
>>> query. And well, after 4seconds, Fuseki returned the desired timeout
>>> error.
>>>
>>> Now, on the actual server, with Fuseki wrapped inside Tomcat, the
>>> timelimit is not working.
>>>
>>> For instance, this sample query:
>>>
>>> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
>>> PREFIX prop-de: <http://de.dbpedia.org/property/>
>>> PREFIX dcterms: <http://purl.org/dc/terms/>
>>>
>>> SELECT ?s
>>>
>>> WHERE
>>> {
>>> ?s prop-de:name ?all_names .
>>> ?s dcterms:subject ?category .
>>> FILTER (regex(?all_names," ","i"))
>>> }
>>>
>>> takes about 50 seconds in PHP.
>>>
>>> Hope, those details help you understand the setup.
>>>
>>> Thanks again and in advance!
>>>
>>> Best regards,
>>> Christian
>>>
>>>
>>> ----------------------------------------
>>>> Date: Thu, 7 May 2015 11:35:45 +0100
>>>> From: [email protected]
>>>> To: [email protected]
>>>> Subject: Re: Fuseki as Web Application read configuration file
>>>>
>>>> Hi Christian,
>>>>
>>>> Something is causing the 4s to be ignored - I don't know for sure but if
>>>> you are controlling the timeouts then it does need to be addressed
>>>> because even if it's not a factor at the moment, it may well become one.
>>>> I don't have a complete picture of your setup yet.
>>>>
>>>> What are the queries taking a long time? (There are places where the
>>>> timeout can be delayed.)
>>>>
>>>> Andy
>>>>
>>>> On 07/05/15 08:08, Christian Schwaderer wrote:
>>>>> Thanks!
>>>>>
>>>>> But before I try it, let me ask (just to make sure): Are you really
>>>>> sure that this is the problem here?
>>>>> As I mentioned earlier, my queries take up to 20 seconds. So, if
>>>>> there is a 3 seconds time limit set somewhere for my dataset - this
>>>>> setting is definitely not working.
>>>>>
>>>>> Best regards!
>>>>>
>>>>> ----------------------------------------
>>>>>> Date: Wed, 6 May 2015 22:25:42 +0100
>>>>>> From: [email protected]
>>>>>> To: [email protected]
>>>>>> Subject: Re: Fuseki as Web Application read configuration file
>>>>>>
>>>>>> On 06/05/15 19:03, Christian Schwaderer wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> thanks for the answer!
>>>>>>>
>>>>>>> The full config file looks like so:
>>>>>>>
>>>>>>> @prefix : <#> .
>>>>>>> @prefix fuseki: <http://jena.apache.org/fuseki#> .
>>>>>>> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
>>>>>>> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
>>>>>>> @prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
>>>>>>>
>>>>>>> [] rdf:type fuseki:Server ;
>>>>>>>
>>>>>>> ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "4000" ] ;
>>>>>>>
>>>>>>> .
>>>>>>>
>>>>>>> (Comments removed)
>>>>>>>
>>>>>>> Yes, I created the dataset with the UI. How can I remove the
>>>>>>> dataset timeout setting?
>>>>>>
>>>>>> There is a bit more in:
>>>>>> http://mail-archives.apache.org/mod_mbox/jena-users/201504.mbox/%3C5533D97F.20406%40apache.org%3E
>>>>>>
>>>>>>
>>>>>> but the workaround is:
>>>>>>
>>>>>> The directory run/system_files has a copy of the file. This is not the
>>>>>> file the server works off (that's in the database).
>>>>>>
>>>>>> 0/ Stop the server
>>>>>>
>>>>>> 1/ If you have only one dataset, copy that file to
>>>>>> run/configuration/mydatabase.ttl (any fresh base name, must end ttl).
>>>>>>
>>>>>> 2/ Edit the "run/configuration" file to remove the line:
>>>>>>
>>>>>> ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "3000" ] ;
>>>>>>
>>>>>> or set it to whatever you want.
>>>>>>
>>>>>> 3/ Delete the system database
>>>>>>
>>>>>> 4/ Restart the server
>>>>>>
>>>>>> Andy
>>>>>>
>>>>>>>
>>>>>>> Best,
>>>>>>> Christian
>>>>>>>
>>>>>>> ----------------------------------------
>>>>>>>> Date: Wed, 6 May 2015 18:52:10 +0100
>>>>>>>> From: [email protected]
>>>>>>>> To: [email protected]
>>>>>>>> Subject: Re: Fuseki as Web Application read configuration file
>>>>>>>>
>>>>>>>> On 06/05/15 18:44, Christian Schwaderer wrote:
>>>>>>>>> Hi again,
>>>>>>>>>
>>>>>>>>> I'm almost done setting up Fuseki as Tomcat web application.
>>>>>>>>> Still, there is another problem: How can I make sure that Fuseki
>>>>>>>>> reads its configuration file?
>>>>>>>>>
>>>>>>>>> I want to set a timeout (4sec) and thus, I've added the line
>>>>>>>>> ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "4000" ] ;
>>>>>>>>>
>>>>>>>>> in the file /etc/fuseki/config.ttl
>>>>>>>>>
>>>>>>>>> But it doesn't work. Fuseki still executes queries taking about
>>>>>>>>> 20 seconds.
>>>>>>>>> I've also copied the file config.ttl to
>>>>>>>>> /etc/fuseki/configuration - but to no avail.
>>>>>>>>>
>>>>>>>>> Thanks in advance and best regards
>>>>>>>>> Christian
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> Hi Christian,
>>>>>>>>
>>>>>>>> What's the full config file? One thing to be aware of is that it
>>>>>>>> is not
>>>>>>>> set on the datatset as the more specific setting overrides the
>>>>>>>> server
>>>>>>>> wide setting.
>>>>>>>>
>>>>>>>> If the TDB database was created via the UI, unfortunately there
>>>>>>>> is a bug
>>>>>>>> in the template for created TDB databases and it puts in a
>>>>>>>> timout. It
>>>>>>>> can be removed; the server needs to be restarted.
>>>>>>>>
>>>>>>>> Andy
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>
                                          

Reply via email to