Neo4j Lucene在一定限制后无法创建节点,为什么?

时间:2014-05-29 10:46:34

标签: lucene neo4j

我试图在我的本地neo4j服务器中插入超过10k个节点。[Mac OS]。但是一段时间后它会产生运行时错误。

Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException:     /Users/shihabrahman/Development/projects/opt_neo4j_importar/neo4j/data/graph.db/index/lucene/node/146483049887488028/_0.nrm (Too many open files)
at org.neo4j.index.impl.lucene.LuceneDataSource.refreshSearcher(LuceneDataSource.java:516)
at org.neo4j.index.impl.lucene.LuceneDataSource.refreshSearcherIfNeeded(LuceneDataSource.java:635)
at org.neo4j.index.impl.lucene.LuceneDataSource.getIndexSearcher(LuceneDataSource.java:577)
at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:293)
at org.neo4j.index.impl.lucene.LuceneIndex.get(LuceneIndex.java:229)
at org.neo4j.graphdb.index.UniqueFactory.getOrCreateWithOutcome(UniqueFactory.java:230)
at org.neo4j.graphdb.index.UniqueFactory.getOrCreate(UniqueFactory.java:216)
at com.ws.dao.NodeDaoImpl.createUniqueNode(NodeDaoImpl.java:71)
at com.ws.dao.NodeDaoImpl.createNode(NodeDaoImpl.java:34)
at com.ws.App.main(App.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

我已经增加了ulimit中打开文件数量的限制。

1 个答案:

答案 0 :(得分:1)

我有一种感觉,你改变了你的ulimit值,但没有正确的方法来坚持他们的OSX。

您是否在/etc/launchd.conf中添加了值?

limit maxfiles 40000 40000