How to change the read timeout of cypher-shell?

303 Views Asked by At

Using Neo4j 4.4.11 (community edition), I'm trying to delete a certain type of relationships from my graph with cypher-shell:

MATCH ()-[r:MYRELATIONSHIPLABEL]->() CALL { WITH r DETACH DELETE r } IN TRANSACTIONS OF 10000 ROWS;

But I always end up with this error:

Connection read timed out due to it taking longer than the server-supplied timeout value via configuration hint.

Is it possible to increase the read timeout directly in cypher-shell without changing the server settings? (I did not find anything in the docs.)

1

There are 1 best solutions below

2
On

Yes, that is possible by using the following command.

call dbms.setConfigValue('dbms.transaction.timeout','0')

The zero indicates that there should be no timeout. As indicated by Christophe in the comments, this call changes the server setting via cypher shell, so all the applications connecting to Neo4j are affected. There is no way around this other than to change it back to the original setting once you are done.