Reputation: 1929
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.
Upvotes: 3
Views: 5584
Reputation: 2602
I believe dbms.transaction.timeout
is the current way of limiting execution time
Upvotes: 4
Reputation: 1929
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.
Upvotes: 5