通过连接字符串中设置服务器炫技连接超时
问题描述:
我开始炫技服务上使用以下配置窗口(这是配置文件的重要组成部分):通过连接字符串中设置服务器炫技连接超时
ResultSetMaxRows = 10000
MaxQueryCostEstimationTime = 40000 ; in seconds
MaxQueryExecutionTime = 60000 ; in seconds
DefaultQuery = select * where{?x ?y ?z}
DeferInferenceRulesInit = 0 ; controls inference rules loading
我使用的dotNetRDF库使本地查询到本地服务器(库使得超时30秒),但我可以通过启动对象时发送一个连接字符串覆盖默认的超时:在30秒
VirtuosoManager manager = new VirtuosoManager("Server=localhost;Uid=dba;pwd=dba;Connection Timeout=500");
它仍然超时(如果我的查询非常复杂,足以在mor中处理比30秒...
我的项目使用了一些复杂的查询,所以我需要尽可能大的超时属性,我如何覆盖该属性?
答
Virtuoso ADO.Net Provider DB命令类具有CommandTimeout属性,默认值为30秒,详见VirtuosoCommand class documentation。
这是您正在打的超时(不是连接超时)。
自修订版2148起,dotNetRDF库允许根据需要设置此属性值。
回答在http://answers.semanticweb.com/questions/14568/overriding-dotnetrdfdatavirtuoso-timeout-property – RobV 2012-02-29 00:18:25
也在[ServerFault](http://serverfault.com/questions/361067/setting-the-连接超时功能于演奏家 - 服务器 - 经由连接串/) – TallTed 2014-09-25 20:13:04