Out of the box Wikidata Query Service allows all queries to run without timing out. This might lead to the Query service instance becoming stuck by long-running queries.
As a Wikibase instance maintainer, I want to be able to introducing timeout policy for my SPARQL query service, so I could prevent it from being abused.
- In prototypical Wikibase docker images the issue has been addressed with the custom nginx "WDQS proxy": https://github.com/wmde/wikibase-docker/tree/master/wdqs-proxy
- In WMF production the issue is also avoided with similar nginx code https://gerrit.wikimedia.org/g/operations/puppet/+/0fc5b7ae38772370074fcafe329a2ff92fae5418/modules/query_service/templates/nginx.erb#158
- Solution for defining timeouts for the SPARQL query service has been documented in the instructions for the users of the tarball packages
- SPARQL query service provided in the official container image has the timeout solution provided