Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java heap space error neo4j

Tags:

java

memory

neo4j

I've just setup neo4j 2.1.3 community for the first time and I run into a java heap space OutOfMemoryError when trying to load a dataset of about 17M.

I'm working on a Mac with 16GB memory and OS X 10.9.4 java version 1.7.0_21 and I tried increasing the heap size via the command line with:

java -Xmx2048m

Problem is that the jvm doesn't seem to recongize this. I'm not experienced in setting java settings this way.

Any suggestions?

like image 617
user3321659 Avatar asked Aug 27 '14 14:08

user3321659


2 Answers

You can change settings of JVM heap in configuration file neo4j-wrapper.conf

# Java Heap Size: by default the Java heap size is dynamically
# calculated based on available system resources.
# Uncomment these lines to set specific initial and maximum
# heap size in MB.
#wrapper.java.initmemory=512
#wrapper.java.maxmemory=512

http://neo4j.com/docs/stable/server-performance.html

like image 194
MicTech Avatar answered Sep 28 '22 10:09

MicTech


Its worth noting that these configuration settings have now been moved to neo4j.conf: http://neo4j.com/docs/operations-manual/current/performance/#heap-sizing

like image 22
Antony Avatar answered Sep 28 '22 08:09

Antony