简体   繁体   English

neo4j和max打开文件

[英]neo4j and max open files

I'm using neo4j 1.8M06 on ubuntu. 我在ubuntu上使用neo4j 1.8M06。 When I start it, I get this warning: 当我启动它时,我收到此警告:

WARNING: Max 1024 open files allowed, minimum of 40 000 recommended.

what does it mean? 这是什么意思? If it is required, how can I adjust this setting? 如果需要,我该如何调整此设置?

I've seen this thread on the issue but still could not understand it. 我已经在这个问题上看过这个帖子 ,但仍然无法理解。

It means that you can open only '1024'(default) files for writing. 这意味着您只能打开'1024'(默认)文件进行写入。 But NEO4J recommends this value to be 40K . 但是NEO4J建议这个值为40K This can be achieved with the fix as described below. 这可以通过如下所述的修复来实现。

Edit /etc/security/limits.conf and add these two lines: 编辑/etc/security/limits.conf并添加以下两行:

root   soft    nofile  40000
root   hard    nofile  40000

The neo4j recommends "neo4j" in place of "root" here. neo4j在这里推荐“neo4j”代替“root”。 That won't work. 那不行。

You also need to edit /etc/pam.d/common-session* and add the following line to the end: 您还需要编辑/etc/pam.d/common-session*并在结尾添加以下行:

session required pam_limits.so

And yes, finally you've to restart NEO4J. 是的,最后你要重启NEO4J。

sudo service neo4j-service restart

Reference: NEO4J server setup 参考: NEO4J服务器设置

For now(neo4j 3.1.1), neo4j has the official solution for this. 目前(neo4j 3.1.1),neo4j有官方解决方案。

Most Neo4j configuration goes into neo4j.conf. 大多数Neo4j配置进入neo4j.conf。 Some package-specific options are set in /etc/default/neo4j. 某些特定于软件包的选项在/ etc / default / neo4j中设置。

Add this config to /etc/default/neo4j 将此配置添加到/ etc / default / neo4j

NEO4J_ULIMIT_NOFILE=40000

then restart the neo4j service to get it work. 然后重新启动neo4j服务以使其工作。

sudo service neo4j start

see 看到

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM