如何在 Neo4j 3.0.1 中配置查询超时 [英] How to configure a query timeout in Neo4j 3.0.1

查看:8
本文介绍了如何在 Neo4j 3.0.1 中配置查询超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 neo4j.conf 中为 Neo4j 3.0.1 设置查询超时.任何超过超时时间的查询都应该被终止.我主要关心的是为来自 Neo4j 浏览器的查询设置超时.

I'd like to set a query timeout in neo4j.conf for Neo4j 3.0.1. Any query taking longer than the timeout should get killed. I'm primarily concerned with setting the timeout for queries originating from the Neo4j Browser.

看起来这在过去是可能的:

execution_guard_enabled=true
org.neo4j.server.webserver.limit.executiontime=20000

但是,这种旧方法对我不起作用.我看到 Neo4j 3.0 有一个 dbms.transaction_timeout 选项定义为空闲事务超时".但是,此设置似乎也不起作用.

However, this old method doesn't work for me. I see Neo4j 3.0 has a dbms.transaction_timeout option defined as a "timeout for idle transactions". However, this setting also doesn't seem to do the trick.

推荐答案

感谢 @stdob 对于 评论解释解决方案.

在 Neo4j 3.0.1 社区中,我验证了对 neo4j.conf 的以下添加为浏览器查询启用了 1 秒的查询超时:

In Neo4j 3.0.1 Community, I verified that the following addition to neo4j.conf enabled a query timeout of 1 second for Browser queries:

unsupported.dbms.executiontime_limit.enabled=true
unsupported.dbms.executiontime_limit.time=1s

我没有检查超时是否适用于 Neo4j 浏览器之外的查询,但我认为是这样.我确实在 Neo4j 代码库中找到了一些文档,用于 unsupported.dbms.executiontime_limit.time:

I did not check whether the timeout applies to queries oustide of Neo4j Browser, but I assume so. I did find some documentation in the Neo4j codebase for unsupported.dbms.executiontime_limit.time:

如果在数据库中启用了执行时间限制,这将配置最大请求执行时间.

If execution time limiting is enabled in the database, this configures the maximum request execution time.

这篇关于如何在 Neo4j 3.0.1 中配置查询超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆