Closed johannessen closed 3 years ago
@johannessen try this - you can set timeout to 0 to inhibit timeout, or set to -1 to use server-side setting.
Yep, :begin 0
or :begin -1
does the trick. Thanks! But I still think that -1
should be the default in the interactive client if the user doesn’t specify a timeout at all with :begin
. (See #5 about that.)
A transaction timeout can be specified in the server config (dbms.transaction.timeout) or by the client in Bolt (RUN/BEGIN {tx_timeout}). If no timeout is explicitly set by the server or the client, the server default of
0
is used, which disables the feature altogether.At version https://github.com/majensen/libneo4j-client/commit/9b5f358d5eeb0a1378515f46469967f47b8cadd0, neo4j-client uses a default tx timeout of 60 seconds. Disabling the timeout doesn’t appear to be possible.
This issue was previously mentioned in https://github.com/cleishm/libneo4j-client/issues/49#issuecomment-745746728. @majensen
Steps
:begin
Expected
The statement is executed normally.
Actual
A “Transaction timed out” error.
Possible solution
I think that omitting the
tx_timeout
field from theBEGIN
(andRUN
) message will resolve this issue. The field should probably only be sent if a timeout is explicitly requested by the user.