1

我有一个在 localhost 上运行的 Fuseki 服务器,它有一个足够大的数据集,大约 700 万个三元组(加载的文件是 N3 @ 370mb)。

我一直试图在查询中尽可能多地取回数据,但我一直遇到超时问题。我只是运行一个简单的查询来获取所有限制,我一直在向上更改,直到我得到一个不起作用的查询。

SELECT *
FROM <myGraph>
WHERE {
    ?s ?p ?o
}
LIMIT 200000

这个查询的有趣之处在于它可以在提供的 Web 服务器界面上运行localhost:3030(尽管在 firefox 方面有一些工作),但在通过命令行运行时不起作用

./s-query --service=http://localhost:3030/dataset/query --query=queryFile.rq

我得到的错误是:

##  Query cancelled due to timeout during execution   ##
##  ****          Incomplete results           ****   ##

和 Fuseki 日志(替换了日期和时间):

[date time] Fuseki     INFO  [5] exec/select
[date time] Fuseki     INFO  [5] Query Cancelled - results truncated (but 200 already sent)
[date time] Fuseki     INFO  [5] 200 OK (11.370 s)

另外,我应该提到它并不总是11s。有时它更多,有时它更少。但它是(据我所见,总是在一两秒钟之内)。

我尝试修改 s-query 文件以http.read_timeout更改response_no_body()response_print_body(). 但这并没有改变任何东西。

我也尝试按照它的建议添加该行ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "30000" ] ;config.ttl但同样,它似乎并没有改变任何东西。

/run/中“config.ttl”文件的内容

# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0

## Fuseki Server configuration file.

@prefix :        <#> .
@prefix fuseki:  <http://jena.apache.org/fuseki#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .

[] rdf:type fuseki:Server ;

# Example::
# Server-wide query timeout.   
# 
# Timeout - server-wide default: milliseconds.
# Format 1: "1000" -- 1 second timeout
# Format 2: "10000,60000" -- 10s timeout to first result, 
#                            then 60s timeout for the rest of query.
#
# See javadoc for ARQ.queryTimeout for details.
# This can also be set on a per dataset basis in the dataset assembler.
#
# ja:context [ ja:cxtName "arq:queryTimeout" ;  ja:cxtValue "30000" ] ;

# Add any custom classes you want to load.
# Must have a "public static void init()" method.
# ja:loadClass "your.code.Class" ;   

# End triples.
.

任何帮助,将不胜感激。

Fuseki 版本:2.0.0

4

0 回答 0