遇到“WARNING: Max 1024 open files allowed, minimum of 40000 recommended.“问题,请大神帮助,万分感谢!
发布于 2 个月前 作者 yinyanwen 377 次浏览 来自 问答

我打算用./neo4j-admin import --nodes Player.csv导入一个大一点文件,但是报错WARNING: Max 1024 open files allowed, minimum of 40000 recommended. See the Neo4j manual. WARNING! You are using an unsupported Java runtime.

Please use Oracle® Java™ 11, OpenJDK™ 11 to run Neo4j. Please see https://neo4j.com/docs/ for Neo4j installation instructions. org.neo4j.internal.batchimport.input.HeaderException: Unable to parse header at org.neo4j.internal.batchimport.input.csv.DataFactories.parsePropertyType(DataFactories.java:509) at org.neo4j.internal.batchimport.input.csv.DataFactories$AbstractDefaultFileHeaderParser.propertyExtractor(DataFactories.java:308) at org.neo4j.internal.batchimport.input.csv.DataFactories$DefaultNodeFileHeaderParser.entry(DataFactories.java:428) at org.neo4j.internal.batchimport.input.csv.DataFactories$AbstractDefaultFileHeaderParser.create(DataFactories.java:235) at org.neo4j.internal.batchimport.input.csv.CsvInput.verifyHeaders(CsvInput.java:140) at org.neo4j.internal.batchimport.input.csv.CsvInput.<init>(CsvInput.java:118) at org.neo4j.internal.batchimport.input.csv.CsvInput.<init>(CsvInput.java:98) at org.neo4j.importer.CsvImporter.doImport(CsvImporter.java:155) at org.neo4j.importer.ImportCommand.execute(ImportCommand.java:248) at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:67) at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:33) at picocli.CommandLine.executeUserObject(CommandLine.java:1783) at picocli.CommandLine.access$900(CommandLine.java:145) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2150) at picocli.CommandLine$RunLast.handle(CommandLine.java:2144) at picocli.CommandLine$RunLast.handle(CommandLine.java:2108) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:1975) at picocli.CommandLine.execute(CommandLine.java:1904) at org.neo4j.cli.AdminTool.execute(AdminTool.java:77) at org.neo4j.cli.AdminTool.main(AdminTool.java:58) Caused by: java.lang.IllegalArgumentException: 'Name’ at org.neo4j.csv.reader.Extractors.valueOf(Extractors.java:192) at org.neo4j.internal.batchimport.input.csv.DataFactories.parsePropertyType(DataFactories.java:505) … 19 more 我去百度了,找到两种解决方法都没有奏效。 1.sudo nano /etc/security/limits.conf 并添加这两个条目: root soft nofile 40000 root hard nofile 40000 neo4j soft nofile 40000 neo4j hard nofile 40000 panos soft nofile 40000 panos hard nofile 40000 sudo nano /etc/pam.d/su 取消注释这一行 session required pam_limits.so 2.修改neo4j-community-3.3.1 neo4j.conf的配置

修改35行和36行,设置JVM初始堆内存和JVM最大堆内存 dbms.memory.heap.initial_size=2048m dbms.memory.heap.max_size=6144m 我的配置文件修改前面有#

#35到#46行如下:

dbms.memory.heap.initial_size=2048m dbms.memory.heap.max_size=6144m If Neo4j is running on a dedicated server, then it is generally recommended to leave about 2-4 gigabytes for the operating system, give the JVM enough heap to hold all your transaction state and query context, and then leave the rest for the page cache. Java Heap Size: by default the Java heap size is dynamically calculated based on available system resources. Uncomment these lines to set specific initial and maximum heap size. #dbms.memory.heap.initial_size=512m #dbms.memory.heap.max_size=512m

请大家帮助我解决,万分感谢!

回到顶部