我想在 neo4j.conf
中为 Neo4j 3.0.1 设置查询超时。任何花费超过超时时间的查询都应该被终止。我主要关心的是为来自 Neo4j 浏览器的查询设置超时。
看起来像 this was possible过去与:
execution_guard_enabled=true
org.neo4j.server.webserver.limit.executiontime=20000
但是,这种旧方法对我不起作用。我看到 Neo4j 3.0 有一个 dbms.transaction_timeout
选项定义为“空闲事务超时”。但是,此设置似乎也不起作用。
最佳答案
感谢 @stdob对于 the comment解释解决方案。
在 Neo4j 3.0.1 社区中,我验证了对 neo4j.conf
的以下添加为浏览器查询启用了 1 秒的查询超时:
unsupported.dbms.executiontime_limit.enabled=true
unsupported.dbms.executiontime_limit.time=1s
我没有检查超时是否适用于 Neo4j 浏览器之外的查询,但我认为是这样。我确实在 Neo4j 代码库中找到了一些关于 unsupported.dbms.executiontime_limit.time
的文档。 :
If execution time limiting is enabled in the database, this configures the maximum request execution time.
关于neo4j - 如何在 Neo4j 3.0.1 中配置查询超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37400476/