Hi there,
I'm connecting to the neo4j sandbox using google colab. Some queries are ok, but some result in timeout
error.
I want to execute a query using neo4j driver (same situation with py2neo), but it gives this error after about 45 seconds:
{code: Neo.ClientError.Transaction.TransactionTimedOut} {message: The transaction has been terminated. Retry your operation in a new transaction, and you should see a successful result. The transaction has not completed within the specified timeout (dbms.transaction.timeout). You may want to retry with a longer timeout. }
I tried using unit_of_work
in two ways:
from neo4j import unit_of_work
@unit_of_work(timeout=240000) # 240,000 ms -> 240 s -> 4 mins
def execute(query):
return graph.run(query)
and also
neo4j.unit_of_work(timeout=240000)
graph.run(query)
None them solved my problem.
I couldn't find any solutions for py2neo
.
(I can use either of neo4j
and py2neo
drivers, if it is required.)
Thank you.