通过连接字符串在 virtuoso 服务器中设置连接超时
我使用以下配置在 Windows 上启动了 virtuoso 服务(这是配置文件的重要部分):
ResultSetMaxRows = 10000
MaxQueryCostEstimationTime = 40000 ; in seconds
MaxQueryExecutionTime = 60000 ; in seconds
DefaultQuery = select * where{?x ?y ?z}
DeferInferenceRulesInit = 0 ; controls inference rules loading
我正在使用 dotNetRDF 库对本地服务器进行本地查询(该库使超时为 30 秒),但我可以通过在启动对象时发送连接字符串来覆盖默认超时:
VirtuosoManager manager = new VirtuosoManager("Server=localhost;Uid=dba;pwd=dba;Connection Timeout=500");
它仍然在 30 秒超时(如果我的查询足够复杂,需要在 30 秒以上处理......
我的项目使用一些复杂的查询,所以我需要超时属性尽可能大,我如何覆盖该属性?
I started the virtuoso service on windows with the following configurations (this is the important part of the config file):
ResultSetMaxRows = 10000
MaxQueryCostEstimationTime = 40000 ; in seconds
MaxQueryExecutionTime = 60000 ; in seconds
DefaultQuery = select * where{?x ?y ?z}
DeferInferenceRulesInit = 0 ; controls inference rules loading
I'm using the dotNetRDF library to make local queries to the local server (The library makes the timeout 30seconds) , but I can override the default timeout by sending a connection string when starting the object:
VirtuosoManager manager = new VirtuosoManager("Server=localhost;Uid=dba;pwd=dba;Connection Timeout=500");
it still times out at 30seconds (if my query is complex enough to process in more than 30 seconds...
My project uses some complex queries, so I need the timeout property as large as possible , how can I override that property ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Virtuoso ADO.Net Provider DBcommand 类具有 CommandTimeout 属性,默认值为 30 秒,详见 VirtuosoCommand 类文档。
这是您遇到的超时(不是连接超时)。
从修订版 2148 开始,dotNetRDF 库允许根据需要设置此属性值。
The Virtuoso ADO.Net Provider DBcommand class has a CommandTimeout property, with a default value of 30 seconds, as detailed in the VirtuosoCommand class documentation.
This is the timeout you are hitting (not a Connection Timeout).
As of revision 2148, the dotNetRDF library allows this property value to be set as required.