Neo4J – Linux – Configurations

After installing the community edition of Neo4J on Debian VM  understood from manuals about the need to increase the number of files limit for Neo4J.

cat /proc/sys/fs/file-max

The output was 3273723 – So no issues.  In case if it is less you can update it (Set it to lower value if needed, I decided not to change)

# sysctl -w fs.file-max=3273723


# vi /etc/sysctl.conf

and append the following line (value is your choice, for Neo4J the min should be 40000)

fs.file-max = 3273723

Save and close the file. Users need to log out and log back in again to changes take effect or just type the following command:

# sysctl -p

The above procedure sets system-wide file descriptors (FD) limits. However, you can limit neo4j (or any other users) user to specific limits by editing /etc/security/limits.conf file, enter:

# vi /etc/security/limits.conf

Set ne04j user soft and hard limits as follows:

neo4j soft nofile 40000
neo4j hard nofile 40000

This did not work on my VM – On searching the net, there were suggestions to try not logging in as root and with a normal user account with sudo rights.  Both did not work.  Just restarted the system.  Still could not start neo4j – When I tried to start neo4j after doing a ‘su – neo4j’ got message no such file  /var/run/neo4j/ file.  Found out that /var/run/neo4j was not available, created the folder and did a ‘chown neo4j:adm /var/run/neo4j’ and then started neo4j and it worked.


About sandeep

Passionate about sharing information on "how to".
This entry was posted in Uncategorized. Bookmark the permalink.