亲爱的Neo4j程序员,
我已将一个包含33M节点和144M关系的庞大数据集导入Neo4j
。感谢Neo4j开发人员,“neo4j-importer
”非常高效。但是,我收到(打开文件太多)错误。
我在linux机器上运行Neo4j 3.x Java API
,数据集卷 9GB 。幸运的是,我将硬/软打开文件限制增加到40,000。所以,现在ulimit -n
向我展示了40k。
但是,我一直收到以下错误(我总结了异常跟踪):
Caused by: java.io.FileNotFoundException: focusSetIDS.txt (Too many open files)
Exception in thread "Thread-2" org.neo4j.kernel.lifecycle.LifecycleException: Failed to transition component 'org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageEngine@5b61d558' from STOPPED to SHUTTING_DOWN. Please see attached cause exception
Caused by: java.lang.IllegalStateException: Cannot close the PageCache while files are still mapped:
Caused by: java.io.IOException: Exception closing multiple resources
Caused by: java.nio.file.FileSystemException: /xxx/idsForExp/idsAttackDB/schema/label/lucene/labelStore/1: Too many open files
请通过回答以下其中一个问题来指导我:
lucene
之类的Neo4j功能以避免此错误?事实上,我没有明确地索引任何内容,我刚刚使用neo4j-importer
导入节点/关系(在程序中,我可以添加/删除一些关系,但我不会操纵节点)。 File storeDir = new File(dataGraphPath);
dataGraph = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(storeDir)
.setConfig(GraphDatabaseSettings.pagecache_memory, "6g").newGraphDatabase();