How to configure a query timeout in Neo4j 3.0.1

吃可爱长大的小学妹 提交于 2019-12-20 02:47:06

问题


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.

It looks like this was possible in the past with:

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

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.


回答1:


Thanks to @stdob for the comment explaining a solution.

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

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.




回答2:


I believe dbms.transaction.timeout is the current way of limiting execution time



来源:https://stackoverflow.com/questions/37400476/how-to-configure-a-query-timeout-in-neo4j-3-0-1

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!