Dhruv Chawla
Dhruv Chawla

Reputation: 31

Increase Transaction timeout in Neo4j Sandbox (Neo4j Browser version: 4.2.1)

I'm trying to Load a CSV file with 50,000 rows into Neo4j Browser (sandbox) and the transaction keeps timing out. I understand that I need to increase the timeout time, but don't know how to do it.

Here is the error I receive;


Neo.ClientError.Transaction.TransactionTimedOut

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.


Just to reiterate, I'm not using the Neo4j Desktop or Community so I don't have access to any config files. Please advice!

Upvotes: 3

Views: 1128

Answers (1)

jose_bacoy
jose_bacoy

Reputation: 12704

Use a periodic commit and it will release the transaction every 5000 records processed. See here: https://neo4j.com/docs/cypher-manual/current/clauses/load-csv/#load-csv-importing-large-amounts-of-data

USING PERIODIC COMMIT 5000 LOAD CSV FROM 'file:///artists.csv' AS line
CREATE (:Artist {name: line[1], year: toInteger(line[2])})

Upvotes: 2

Related Questions