neo4j@neo4j:/neo4j/neo4j-community-3.5.0$ bin/neo4j start
Active database: graph.db
Directories in use:
home: /neo4j/neo4j-community-3.5.0
config: /neo4j/neo4j-community-3.5.0/conf
logs: /neo4j/neo4j-community-3.5.0/logs
plugins: /neo4j/neo4j-community-3.5.0/plugins
import: /neo4j/neo4j-community-3.5.0/import
data: /neo4j/neo4j-community-3.5.0/data
certificates: /neo4j/neo4j-community-3.5.0/certificates
run: /neo4j/neo4j-community-3.5.0/run
Starting Neo4j.
WARNING: Max 1024 open files allowed, minimum of 40000 recommended. See the Neo4j manual.
Started neo4j (pid 17466). It is available at http://0.0.0.0:7474/
There may be a short delay until the server is ready.
See /neo4j/neo4j-community-3.5.0/logs/neo4j.log for current status.
I added the following lines in /etc/security/limits.conf
neo4j soft nofile 40000
neo4j hard nofile 40000
root soft nofile 40000
root hard nofile 40000
but the error persists. I also tried an alternate way, adding NEO4J_ULIMIT_NOFILE=60000 to /etc/default/neo4j with no success.
Please, note that the error is only on the console output but NOT into the neo4j.log!
Maybe it's not an error anymore?
For the people landing here by Google (because it's one of the most highly ranked page), see the content of modern /etc/default/neo4j:
It is NOT used for the new systemd service.
To change these values with systemd, please use
systemctl edit neo4j.service
Most of the modern Linux distro do use systemcd
(including the above mentionned Ubuntu 18.04 - save for a few exceptions such as Gentoo's OpenRC)
You need instead to add the file limit options in /etc/systemd/system/neo4j.service.d/override.conf using the above command.
if you're running neo4j using docker-compose, just add these lines to your neo4j service in docker-compose.yml file.
ulimits:
nofile:
soft: "40000"
hard: "40000"
I'm using neo4j database for more than 1 year. Everytime I start server, I see this warning. How can I solve this? I'm using neo4j in ubuntu and also in windows machines
So what's the verdict here on the right setting? Does /lib/systemd/system/neo4j.service on Debian have the right setting with LimitNOFILE=60000? I still see the error message when running neo4j-admin memrec. Or should perhaps this line:
I ran into this today and I didn't want to run the server as a service, at least not yet. I already had the entry in /etc/security/limits.conf for nofiles, but it didn't take effect.
Looking at Number of open files - Knowledge Base I added two files: /etc/pam.d/common-session and /etc/pam.d/common-session-noninteractive with the following line:
session required pam_limits.so
After su'ing back to my user, ulimit -n confirmed that it worked.