When you restart your service you’ll notice this warning:
WARNING: Max 1024 open files allowed, minimum of 40 000 recommended. See the Neo4j manual.
To fix this, edit this file
sudo nano /etc/security/limits.conf
and add these two entries:
root soft nofile 40000 root hard nofile 40000 neo4j soft nofile 40000 neo4j hard nofile 40000 panos soft nofile 40000 panos hard nofile 40000
I add an entry for all three users root
, neo4j
and panos
, but you actually just need the one that you’ll use when you restart the service. Then edit
sudo nano /etc/pam.d/su
uncomment this line
session required pam_limits.so
and restart your server (your machine not the service). //改完要重啟機器
Now if you do
sudo service neo4j-service restart
the warning should have disappeared.
Tags: actually required minimum machine service
文章來源: