`query.timeout` value is ignored

I'm using stardog in docker, the process is the following:

docker pull stardog/stardog
mkdir -p stardog
docker run -d --name=stardog \
       -v ${PWD}/stardog:/var/opt/stardog \
       -v ${PWD}/data:/data \
       -p 5820:5820 \
       -e STARDOG_SERVER_JAVA_ARGS="-Xmx64g -Xms12g -XX:MaxDirectMemorySize=2g" \
       stardog/stardog

Load Data

docker exec -it stardog /bin/bash

/opt/stardog/bin/stardog-admin db create \
   -v -n mydata @http://rdf.bonsai.uno /data/my_data/*.ttl /data/my_data/*.gz

Configure query timout

docker stop stardog
sudo cp my.system.properties ./stardog/data/db_meta/system.properties
docker start stardog

The content is the following:

compression = 4
wal_enabled = true
force_write_conflict_checking = true
index_strategy.dependency = SPO,,,
index_strategy.dependency = POS,,,
index_strategy.dependency = OSP,,,
index_strategy.dependency = PSO,,,
index_strategy.dependency = SPOC,,,
index_strategy.dependency = POSC,,,
index_strategy.dependency = OSPC,,,
index_strategy.dependency = PSOC,,,
query.timeout=1h

Yet, when I run the query I receive:

{
"message":
    "com.complexible.stardog.plan.eval.operator.OperatorException: Execution time exceeded query timeout 300000",
"code": "QEQOE2"
}

See also

I still cannot understand what I am doing wrong.

Hi,

It looks like you are setting these properties in a file called $STARDOG/system.properties. You should instead put them in $STARDOG_HOME/stardog.properties, and then restart. Additionally, once the database is created, the query.timeout setting is set for it, and to change it you would need to perform stardog-admin metadata set -o query.timeout=1h -- myDb

That was it. Thanks a lot!

For couriosity, why do I need to set the timeout by command and not by config?

In this case, the timeout was set at db creation time to the default value, so updating the properties file wouldn't affect it. It is a per-database setting, not a server-wide one.

Thanks a lot, for the explanation.
And, isn't there a specific database config file that I can overwrite then instead of using the command?

Hi Matteo,

No, not really. The db create command indeed can take a database configuration file but it's only used when the database is created. Any later configuration changes should be done through the metadata set command.

Cheers,
Pavel

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.