我正在尝试使用neo4-import工具从csv文件导入新的neo4j数据库上的130M节点和200M关系,并且它会卡在进程上。
流程的输出:
Nodes [>:3.35 MB/s---|PROPERTIES(2)======|*NODE:1007.08 MB------|LABEL SCAN-----|v:7.46 MB/s(2)======]131M
Done in 1h 35m 47s 332ms
Prepare node index
[*SORT:1.47 GB---------------------------------------------------------------------------------] 87M
messages.log的内容
2015-06-15 10:38:56.423+0000 INFO [org.neo4j]: Import starting
2015-06-15 10:38:56.537+0000 INFO [org.neo4j]: Creating new db @ /var/user/neo/graph22.db/neostore
2015-06-15 10:38:57.264+0000 INFO [org.neo4j]: Missing counts store, rebuilding it.
2015-06-15 10:38:57.536+0000 INFO [org.neo4j]: No lucene scan store index found, this might just be first use. Preparing to rebuild.
2015-06-15 10:38:57.581+0000 INFO [org.neo4j]: No lucene scan store index found, this might just be first use. Preparing to rebuild.
2015-06-15 10:38:57.793+0000 INFO [org.neo4j]: Rebuilding lucene scan store, this may take a while
2015-06-15 10:38:57.796+0000 INFO [org.neo4j]: Lucene scan store rebuilt (roughly -1 nodes)
2015-06-15 18:29:33.509+0000 INFO [org.neo4j]: About to rotate counts store at transaction 1 to [/var/user/neo/graph22.db/neostore.counts.db.b], from [/var/user/neo/graph22.db/neostore.counts.db.a].
2015-06-15 18:29:33.516+0000 INFO [org.neo4j]: Successfully rotated counts store at transaction 1 to [/var/user/neo/graph22.db/neostore.counts.db.b], from [/var/user/neo/graph22.db/neostore.counts.db.a].
2015-06-15 18:29:33.771+0000 ERROR [org.neo4j]: Error during import null
java.lang.StackOverflowError
at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.ParallelSort.partition(ParallelSort.java:193)
at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.ParallelSort.recursiveQsort(ParallelSort.java:243)
at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.ParallelSort.recursiveQsort(ParallelSort.java:246)
at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.ParallelSort.recursiveQsort(ParallelSort.java:246)
at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.ParallelSort.recursiveQsort(ParallelSort.java:246)
at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.ParallelSort.recursiveQsort(ParallelSort.java:246)
at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.ParallelSort.recursiveQsort(ParallelSort.java:246)
at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.ParallelSort.recursiveQsort(ParallelSort.java:246)
at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.ParallelSort.recursiveQsort(ParallelSort.java:246)
at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.ParallelSort.recursiveQsort(ParallelSort.java:246)
at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.ParallelSort.recursiveQsort(ParallelSort.java:246)
at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.ParallelSort.recursiveQsort(ParallelSort.java:246)
at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.ParallelSort.recursiveQsort(ParallelSort.java:246)
导致流程失败的原因是什么?有什么办法可以解决这个问题吗?
我正在使用neo4j-community-2.2.2
答案 0 :(得分:2)
我遇到了同样的问题,但版本为2.2.3。我通过编辑文件bin / neo4j-import并添加更多堆栈空间(以及更多堆,因为我拥有它)来解决它:
EXTRA_JVM_ARGUMENTS="-Dfile.encoding=UTF-8 -Xmx8g -Xss128m"
但是现在我有一个不同的问题 - 递归是1023级深度(我只排序了大约5亿个节点),我不确定排序是否会完成:)