You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Christian Schwaderer <c_...@hotmail.com> on 2015/05/06 19:44:23 UTC

Fuseki as Web Application read configuration file

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
 		 	   		  

Re: Fuseki as Web Application read configuration file

Posted by Andy Seaborne <an...@apache.org>.
On 11/05/15 14:41, Christian Schwaderer wrote:
> 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

Hi Christian,

If a timeout goes off, the output is intentionally invalid

e.g.

##  Query cancelled due to timeout during execution   ##
##  ****          Incomplete results           ****   ##

With HTTP, the status code has to go first, before you know you can 
deliver the results.  Buffering the response breaks scale and leads to 
poor latency.

Maybe this is what is confusing ARC2, then it holds the connection open, 
waiting.

You might try asking for a different format (sorry - don't know ARC2 
well enough).



	Andy


>
> ----------------------------------------
>> Date: Mon, 11 May 2015 12:35:24 +0100
>> From: andy@apache.org
>> To: users@jena.apache.org
>> 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: andy@apache.org
>>>>> To: users@jena.apache.org
>>>>> 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: andy@apache.org
>>>>>>> To: users@jena.apache.org
>>>>>>> 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: andy@apache.org
>>>>>>>>> To: users@jena.apache.org
>>>>>>>>> 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
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>   		 	   		
>


RE: Fuseki as Web Application read configuration file

Posted by Christian Schwaderer <c_...@hotmail.com>.
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: andy@apache.org
> To: users@jena.apache.org
> 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: andy@apache.org
>>>> To: users@jena.apache.org
>>>> 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: andy@apache.org
>>>>>> To: users@jena.apache.org
>>>>>> 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: andy@apache.org
>>>>>>>> To: users@jena.apache.org
>>>>>>>> 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
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>
 		 	   		  

Re: Fuseki as Web Application read configuration file

Posted by Andy Seaborne <an...@apache.org>.
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: andy@apache.org
>>> To: users@jena.apache.org
>>> 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: andy@apache.org
>>>>> To: users@jena.apache.org
>>>>> 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: andy@apache.org
>>>>>>> To: users@jena.apache.org
>>>>>>> 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
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
>


Re: Fuseki as Web Application read configuration file

Posted by Andy Seaborne <an...@apache.org>.
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: andy@apache.org
>> To: users@jena.apache.org
>> 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: andy@apache.org
>>>> To: users@jena.apache.org
>>>> 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: andy@apache.org
>>>>>> To: users@jena.apache.org
>>>>>> 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
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>   		 	   		
>


RE: Fuseki as Web Application read configuration file

Posted by Christian Schwaderer <c_...@hotmail.com>.
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: andy@apache.org
> To: users@jena.apache.org
> 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: andy@apache.org
>>> To: users@jena.apache.org
>>> 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: andy@apache.org
>>>>> To: users@jena.apache.org
>>>>> 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
>>>>
>>>>
>>>
>>
>>
>
 		 	   		  

Re: Fuseki as Web Application read configuration file

Posted by Andy Seaborne <an...@apache.org>.
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: andy@apache.org
>> To: users@jena.apache.org
>> 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: andy@apache.org
>>>> To: users@jena.apache.org
>>>> 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
>>>
>>>
>>
>   		 	   		
>


RE: Fuseki as Web Application read configuration file

Posted by Christian Schwaderer <c_...@hotmail.com>.
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: andy@apache.org
> To: users@jena.apache.org
> 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: andy@apache.org
>>> To: users@jena.apache.org
>>> 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
>>
>>
>
 		 	   		  

Re: Fuseki as Web Application read configuration file

Posted by Andy Seaborne <an...@apache.org>.
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: andy@apache.org
>> To: users@jena.apache.org
>> 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
>   		 	   		
>


RE: Fuseki as Web Application read configuration file

Posted by Christian Schwaderer <c_...@hotmail.com>.
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?

Best,
Christian

----------------------------------------
> Date: Wed, 6 May 2015 18:52:10 +0100
> From: andy@apache.org
> To: users@jena.apache.org
> 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
 		 	   		  

Re: Fuseki as Web Application read configuration file

Posted by Andy Seaborne <an...@apache.org>.
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