Wikidata as endpoint

I'm trying to use Wikidata as an endpoint using SERVICE, with the following query.

PREFIX wdt: <http://www.wikidata.org/prop/direct/>

    SELECT
      ?city ?label
    WHERE {
      SERVICE <https://query.wikidata.org/sparql> {
        ?city wdt:P17 ?label.
      }
    }

However, this query results in an error "Internal Server Error". How do I solve this?

Hi, could you attach stardog.log in your STARDOG_HOME directory?

Thanks,
Pavel

stardog.log (65.0 KB)

The log suggests that the server ran out of memory while parsing the SPARQL result set. How many results do you expect this query to return? You may bump Java heap in $STARDOG_SERVER_JAVA_ARGS (using -Xmx, then restart the server) or use a more selective query.

All that assumes the server isn't under other load which may have consumed memory too.

Best,
Pavel

It seems to work now, thanks for your quick answer!

It wold be nice if there was a way to restrict what services a user could access sort of like what is currently available for named graphs.

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