Ravi Kumar
Ravi Kumar

Reputation: 993

How to increase query timeout in fuseki 2.0.0

I am running Fuseki server version - 2.0.0

I have created dataset with it's UI manage datasets > add new dataset. ie. i didn't configure it with any ttl configuration file.

The problem is when i run a complex query which is going to take longer time it is giving me following response -

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

But for simple and less time taking queries it is giving result.

I searched for this error and all i could find i need to increase query timeout. But i am seriously unable to find in which configuration file i have to.

I tried doing it run/templates/config-tdb file without any success.

Please help me to understand following things:

  1. Is this error because of query timeout or for some other reason?

  2. If it is query timeout then in which configuration file i actually have to write this configuration?

  3. If it is because of some other reason then what it could be, and how to proceed to solve it ?

Thanks in advance.

Upvotes: 4

Views: 1109

Answers (2)

David Batista
David Batista

Reputation: 3134

One way to increase the timeout is by changing the config.ttl file

@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 tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .

[] rdf:type fuseki:Server ;
   ja:context [ ja:cxtName "arq:queryTimeout" ;  ja:cxtValue "30000" ] .

The cxtValue is given in miliseconds, so this will set the fuseki server for a timeout of 30 seconds. Depending on your needs you might need or not need all the prefixes defined above.

You then need to start the server like this:

/jena-fuseki/fuseki-server -v --config=config.ttl

Upvotes: 3

daxid
daxid

Reputation: 312

In Fuseki, configuration files are in RDF.

The problem is that, with Fuseki 2.0, the "active" configuration can come from 3 different places :

  • FUSEKI_BASE/config.ttl for server wide configurations
  • FUSEKI_BASE/configuration/[datasetName].ttl for dataset specific configurations
  • FUSEKI_BASE/system that contains TDB files (a database for RDF data)

The more likely is that your timeout configuration is in the FUSEKI_BASE/system database that is not handy to edit (I actually don't have a way to do this...). Note that in Fuseki 2.0, all configurations for datasets created from the UI (as yours) are stored in FUSEKI_BASE/system with likely some default value for timeout. With Fuseki 2.3, configurations for datasets created from the UI are stored as ttl files in FUSEKI_BASE/configuration/, making them easy to edit.

As a workaround, it's good to know that a per-query timeout is possible with the header "Timeout:" or parameter &timeout=.

Upvotes: 1

Related Questions