1
votes

I'm running neo4j on a Raspberry Pi and have the server up and running, though the web interface is giving me some trouble. Whenever I load the endpoint on my browser I get the start page with an error message that reads: "Disconnected from Neo4j. Please check if the cord is unplugged."

The following exceptions are present in the logs when the crash happens: http://pastebin.com/2V2eZ876

Every now and then things will work correctly and I'll be able to read / write to the database from the web UI, but this is quite rare (1:20-ish) and seems to be random. Because of this and the fact that I'm running on a Raspberry Pi [1] I suspect memory shortages may be at fault but I'm not sure how to confirm. I've change my neo4j-wrapper.conf to give Java 128M initially and up to 256M with no success. I have no idea if that's even close to what's required.

I'm running neo4j-community-2.0.0. Any help is appreciated!

[1] Minimum mem requirements are listed as 2GB, RPi has 512M. http://docs.neo4j.org/chunked/stable/deployment-requirements.html

1

1 Answers

3
votes

First of all, an x86 or x86_64 is also (if a bit implicitly) among the hardware requirements. This basically means that it isn't tested on ARM, nor is ARM officially supported.

That said, it should be possible to run Neo4j on a Raspberry Pi. It won't be fast, but it should run. However, it has been observed that file handles may be unexpectedly closed on ARM, when the system is close to running out of memory.

There are a number of toggles you need to tweak to bring down the total amount of memory used by the database. Some are for Neo4j itself and some are for the JVM.

Another fella had problems running Neo4j on a BeagleBone Black which also has 512 MB of memory. He found the following configuration to be stable:

neo4j.properties

neostore.nodestore.db.mapped_memory=1M
neostore.relationshipstore.db.mapped_memory=1M
neostore.propertystore.db.mapped_memory=1M
neostore.propertystore.db.strings.mapped_memory=1M
neostore.propertystore.db.arrays.mapped_memory=1M

neo4j-wrapper.conf

wrapper.java.initmemory=96
wrapper.java.maxmemory=96
wrapper.java.additional=-XX:MaxPermSize=32M

Your milage may vary, though, as Neo4j won't be the only thing running on the machine; there's also the operating system, and other programs that need memory.

If you are running into the same situation, then your dmesg output will most likely talk about oom-killer activity.