Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-06-2018 10:32 AM
I got the error in object when I bin/neo4j start.
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?
Can anyone provide a good answer for v3.5.0?
My config is:
12-07-2018 01:21 AM
In Ubuntu you put your settings in /etc/security/limits.d/neo4j.conf
instead.
12-07-2018 03:59 AM
No Stefan. I used your suggestion but the error persists.
12-07-2018 07:39 AM
Try with these file contents:
* soft nofile 40000
* hard nofile 40000
And be sure to reboot the machine afterwards. I'm not aware of a way to apply this config change otherwise.
12-08-2018 10:56 AM
Hi Stefan,
Sorry but neither this approach runs.
Is there a way to check the effective value into the running OS after neo4j is started?
This is because The message is not present into the log,and in this moment, all the different alternatives are loaded together!!!!
I’m available to test everything necessary to solve the problem, but I need inputs
12-08-2018 11:21 AM
check what ulimit -n
spits out. Try with root
user and the uid used for running neo4j - most likely there's a neo4j
user for this.
11-20-2019 08:47 AM
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 usesystemctl 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.
01-03-2020 01:54 PM
The neo4j 3.5.0 service on CentOS seems to have an increased limit configured by default:
[Service]
ExecStart=/usr/share/neo4j/bin/neo4j console
Restart=on-failure
User=neo4j
Group=neo4j
Environment="NEO4J_CONF=/etc/neo4j" "NEO4J_HOME=/var/lib/neo4j"
LimitNOFILE=60000
TimeoutSec=120
Correspondingly, Neo4j service doesn't warn about this in my logs. However, neo4j-admin memrec
does. That looks to me as a false alarm.
05-20-2020 06:39 AM
Managed to solve?
I really have a problem with this OS.
thanks!
05-26-2020 04:07 AM
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"
06-18-2020 05:53 AM
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
08-11-2020 10:05 PM
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:
Environment="NEO4J_CONF=/etc/neo4j" "NEO4J_HOME=/var/lib/neo4j"
have "NEO4J_ULIMIT_NOFILE=60000"
added to it?
07-08-2021 03:07 AM
I opened this thread on 2018.
It is interesting to see the nothing has changed: I just install a freshly copy of neo4j and the error persists.
I thing unfairy that nobody in neo4j is able to spend some time to give a 'precise' and 'definitive' response to this query.
07-08-2021 10:32 AM
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.
All the sessions of the conference are now available online