Virtuoso Open-Source Wiki
Virtuoso Open-Source, OpenLink Data Spaces, and OpenLink Ajax Toolkit
Advanced Search
Location: / Dashboard / Main / VOSIndex / VirtSPARQLEndpointProtection

Safeguarding your Virtuoso-hosted SPARQL Endpoint


Protecting Virtuoso-hosted SPARQL Endpoint.


SPARQL endpoints are easy for random visitors to accidentally overload. Virtuoso allows you to secure your SPARQL endpoint against such abuses in various ways.


The following section should be added to the Virtuoso configuration file (e.g., /opt/virtuoso/database/virtuoso.ini) to safeguard your SPARQL endpoint against excessive usage:

MaxCacheExpiration         = 1    ; Cache Expiration time in seconds; overrides Sponger's default cache invalidation scheme
ExternalQuerySource        = 1
ExternalXsltSource         = 1
ResultSetMaxRows           = 100000
;DefaultGraph               =
MaxQueryCostEstimationTime = 10000    ; in seconds
MaxQueryExecutionTime      = 30    ; in seconds
;ImmutableGraphs            = http://unknown:8890/dataspace
;PingService                =
DefaultQuery               = SELECT DISTINCT ?URI ?ObjectType WHERE { ?URI a ?ObjectType } LIMIT 50
DeferInferenceRulesInit    = 1  ;  Defer loading of inference rules at start up

Details about these settings can be found in the SPARQL Configuration File section of the Virtuoso Online Documentation.

The "DeferInferenceRulesInit = 1" setting is particularly important when hosting large RDF data sets such as DBpedia, as it defers the load of the inference rules (which can take quite some time -- up to an hour!) until after basic server start-up.

Virtuoso Web Services ACLs can also be used to limit access to the SPARQL endpoint.


Powered By Virtuoso