Skip to content

Commit 366d654

Browse files
loveleifrenetapopova
authored andcommitted
Add example
1 parent 3b07119 commit 366d654

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

modules/ROOT/pages/cypher-shell.adoc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,36 @@ CALL dbms.showCurrentUser();
598598
----
599599
====
600600

601+
[[cypher-shell-transaction-timeout]]
602+
== Transaction Timeout
603+
604+
You can start Cypher Shell with a specific transaction timeout which will apply to all transactions during the session.
605+
606+
.Start with transaction timeout argument
607+
====
608+
609+
[source, shell]
610+
----
611+
cypher-shell --transaction-timeout 10m
612+
----
613+
614+
Execute a very long running query.
615+
616+
[source, shell]
617+
----
618+
UNWIND range(0, 90_000) AS x
619+
CALL apoc.util.sleep(100)
620+
RETURN sum(x) AS sum;
621+
----
622+
623+
After ~10 minutes have passed the transaction times out
624+
625+
[queryresult]
626+
----
627+
25N14: invalid transaction state - transaction termination client error. The transaction has been terminated. Retry your operation in a new transaction, and you should see a successful result. Reason: The transaction has not completed within the timeout specified at its start by the client. You may want to retry with a longer timeout.
628+
----
629+
====
630+
601631

602632
[[cypher-shell-support]]
603633
== Supported operating systems

0 commit comments

Comments
 (0)