1
votes

I'm using neo4j community edition. I want to run a query which checks 40 million nodes and update their specific property, if needed. But query fails with this message:

Query failed: {code: Neo.TransientError.General.OutOfMemoryError} {message: There is not enough memory to perform the current task. Please try increasing 'dbms.memory.heap.max_size' in the neo4j configuration (normally in 'conf/neo4j.conf' or, if you you are using Neo4j Desktop, found through the user interface) or if you are running an embedded installation increase the heap by using '-Xmx' command line flag, and then restart the database.}

So I increased dbms.memory.heap.max_size and dbms.memory.heap.initial_size over and over, the same value for both. Despite increasing them to 8192g but this issue occurs again. Should I increase it more? or is it about memory limitation in community edition? preceedly thank you for any solution! :)

1

1 Answers

0
votes

In this condition, it's necessary to batch nodes and then execute query on each batch. It is possible by using plugin apoc and calling procedure apoc.periodic.iterate, like this:

call apoc.periodic.iterate('statement returning items', 'statement per item', {batchSize:100000, batchMode:"BATCH"}

More details are described here