Hi Nuria,

Please ignore my previous email as I didn’t realise that you did actually 
provide the query being run from our uriburner.com SPARQL endpoint to your 
SPARQL endpoint:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sio: <http://semanticscience.org/resource/>
PREFIX ncit: <http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>

SELECT DISTINCT ?disease WHERE {
  SERVICE <http://rdf.disgenet.org/sparql/> {
     ?gda sio:SIO_000628 ?gene,?disease . ?gene rdf:type ncit:C16612 . ?disease 
rdf:type ncit:C7057 .
  }} LIMIT 10

but you missed the most relevant part of the error message returned which is:

        Virtuoso 22023 Error SR078: The result set is too long, must limit 
result for at most 2097151 rows

As you are running a Federated query the “LIMIT” clause is scoped to the local 
SPARQL endpoint, so the LIMIT is not being imposed on your remote SPARQL 
endpoint as when running the equivalent query locally, resulting in the entire 
result set being attempted to be  generated on the remote endpoint and returned 
to the local where the LIMIT would then be imposed.  But the max result set 
size is being hist first on the remote endpoint. Thus you have to reconstruct 
the SPARQL-FED query slightly adding a sub select inside the “SERVICE” part of 
the query to impose the “LIMIT” on the query being executed on the remote as 
follows:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sio: <http://semanticscience.org/resource/>
PREFIX ncit: <http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>

SELECT DISTINCT ?disease WHERE {
  SERVICE <http://rdf.disgenet.org/sparql/> {
    SELECT DISTINCT ?disease where { ?gda sio:SIO_000628 ?gene,?disease . ?gene 
rdf:type ncit:C16612 . ?disease rdf:type ncit:C7057 .} LIMIT 10
  }} 

Then you get the expected 10 rows returned.

Also, note that there is a new Virtuoso 7.2 open source ( and commercial ) 
release [1] now available I would recommend an upgrade to be scheduled. 

In addition it does not appear you have run the Virtuoso functions for 
determining a remote Virtuoso SPARQL endpoint capabilities [2] as your endpoint 
returns an empty document:

$ curl -iLH "Accept: text/turtle" http://rdf.disgenet.org/sparql/
HTTP/1.1 200 OK
Date: Thu, 26 Feb 2015 01:46:50 GMT
Server: Virtuoso/07.10.3211 (Linux) x86_64-unknown-linux-gnu
Accept-Ranges: bytes
Content-Type: text/turtle; charset=utf-8
Content-Length: 15

# Empty TURTLE


Thus please run the command detailed in the document to optimise the endpoint 
for SPARQL-FED queries against other Virtuoso endpoints ...

[1] 
http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/#2015-02-11:%20Virtuoso%207.2.0%20Released,%20Open%20Source%20and%20Commercial%20Editions
[2] 
http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VirtTipsAndTricksDiscoverSPARQFedCapabilitiesSPARQL


Best Regards
Hugh Williams
Professional Services
OpenLink Software, Inc.      //              http://www.openlinksw.com/
Weblog   -- http://www.openlinksw.com/blogs/
LinkedIn -- http://www.linkedin.com/company/openlink-software/
Twitter  -- http://twitter.com/OpenLink
Google+  -- http://plus.google.com/100570109519069333827/
Facebook -- http://www.facebook.com/OpenLinkSoftware
Universal Data Access, Integration, and Management Technology Providers

> On 25 Feb 2015, at 23:52, Hugh Williams <hwilli...@openlinksw.com> wrote:
> 
> Hi Nuria,
> 
> You indicate the problem is occuring when "our endpoint is queried from 
> another endpoint via the 'SERVICE’ command” , but if I execute the following 
> simple SPARQL FED query:
> 
> PREFIX foaf: <http://xmlns.com/foaf/0.1/>
> SELECT ?s
> WHERE {
> SERVICE <http://rdf.disgenet.org/sparql/>{
>  ?s foaf:page ?o .
> } 
> } LIMIT 10
> 
>  from our LOD Cloud Cache server (http://lod.openlinksw.com/sparql) against 
> your SPARQL endpoint (ie http://rdf.disgenet.org/sparql/ ) it does 
> successfully execute and return results:
> 
> http://lod.openlinksw.com/sparql?default-graph-uri=&qtxt=PREFIX+foaf%3A+%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0D%0ASELECT+%3Fs%0D%0AWHERE+%7B%0D%0ASERVICE+%3Chttp%3A%2F%2Frdf.disgenet.org%2Fsparql%2F%3E%7B%0D%0A+%3Fs+foaf%3Apage+%3Fo+.%0D%0A%7D+%0D%0A%7D+LIMIT+10&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=30000&debug=on
> 
> or short URL:
> 
>       http://bit.ly/1DX3pFz
> 
> Executing a similar SPARQL FED query from your endpoint  (ie 
> http://rdf.disgenet.org/sparql/ ) to another remote Virtuoso SPARQL endpoint 
> also works:
> 
> http://rdf.disgenet.org/sparql/?default-graph-uri=&qtxt=PREFIX+foaf%3A+%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0D%0ASELECT+%3Fs%0D%0AWHERE+%7B%0D%0ASERVICE+%3Chttp%3A%2F%2Flinkeddata.openlinksw.com%2Fsparql%2F%3E%7B%0D%0A+%3Fs+foaf%3Apage+%3Fo+.%0D%0A%7D+%0D%0A%7D+LIMIT+10&format=text%2Fhtml&timeout=0&debug=on
> 
> or short URL:
> 
>       http://bit.ly/1Et45BF
> 
> Thus what is an example remote SPARQL endpoint being used and what is the 
> query being run when encountering the error ?
> 
> Best Regards
> Hugh Williams
> Professional Services
> OpenLink Software, Inc.      //              http://www.openlinksw.com/
> Weblog   -- http://www.openlinksw.com/blogs/
> LinkedIn -- http://www.linkedin.com/company/openlink-software/
> Twitter  -- http://twitter.com/OpenLink
> Google+  -- http://plus.google.com/100570109519069333827/
> Facebook -- http://www.facebook.com/OpenLinkSoftware
> Universal Data Access, Integration, and Management Technology Providers
> 
>> On 24 Feb 2015, at 16:53, Nuria Queralt Rosinach <nquer...@imim.es> wrote:
>> 
>> Dear all,
>> 
>> From our SPARQL endpoint (<http://rdf.disgenet.org/sparql/>), the following 
>> error message come up when our endpoint is queried from another endpoint via 
>> the 'SERVICE' command:
>> 
>> Virtuoso RDFZZ Error DB.DBA.SPARQL_REXEC('http://rdf.disgenet.org/sparql/', 
>> ...) returned Content-Type 'text/plain' status 'HTTP/1.1 500 SPARQL Request 
>> Failed 
>> 
>> I checked that the same query works from our endpoint [1], but it doesn't 
>> work when queried from another endpoint [2], for that reason i think that 
>> the problem is related to our FED service:
>> 
>> [1] http://goo.gl/ZCalrc
>> 
>> [2] http://goo.gl/N1VsfJ
>> 
>> Our server version is:
>> OpenLink Virtuoso  Server
>> Version 07.10.3211-pthreads for Linux as of Nov  4 2014 
>> Started on: 2015-02-20 15:26 GMT+1
>> 
>> Do you know how could i solve this issue? Many thanks in advance.
>> 
>> Best regards,
>> Núria
>> -- 
>> ********************************************************************
>> Núria Queralt Rosinach
>> Research Programme on Biomedical Informatics (GRIB)
>> Department of Experimental and Health Sciences
>> Universitat Pompeu Fabra
>> IMIM (Hospital del Mar Medical Research Institute)
>> C/Dr. Aiguader 88, 08003
>> Barcelona, Spain
>> Tel.: +34 93 316 0536 (1536)
>> E-mail: 
>> nquer...@imim.es
>> 
>> Skype IM: nuriaqr76
>> 
>> http://ibi.imim.es/
>> 
>> ********************************************************************
>> 
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming The Go Parallel Website, 
>> sponsored
>> by Intel and developed in partnership with Slashdot Media, is your hub for 
>> all
>> things parallel software development, from weekly thought leadership blogs to
>> news, videos, case studies, tutorials and more. Take a look and join the 
>> conversation now. 
>> http://goparallel.sourceforge.net/_______________________________________________
>> Virtuoso-users mailing list
>> Virtuoso-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
> 
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the 
> conversation now. 
> http://goparallel.sourceforge.net/_______________________________________________
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to