Knowledge Base

How do I configure init and max java heap when running bin/neo4j-backup

When running $NEO4J_HOME/bin/neo4j-backup if a Java out of heap/memory error occurs you may want define the init and max Java heap to be used by neo4j-backup. The default behavior is to allow the JVM to define the init and max heap as as described here.

To define the init and max heap, before running $NEO4J_HOME/bin/neo4j-backup define the environment varaible JAVA_OPTS, for example:

export JAVA_OPTS='-Xms2048m -Xmx2048m'

which will set the init and max Java heap to 2GB.