我正在评估Windows中的Neo4j。因为我需要从.NET应用程序访问Neo4j,所以我通过.NET客户端库(http://hg.readify.net/neo4jclient/)使用Neo4j Cypher REST API。Neo4j - 内存不足 - Cypher REST API
当遍历一个合理大小的图(大约100,000个节点)时,我面对Neo4j java服务器中的“内存不足”问题。以下是REST响应中报告的异常。另外,下面提到的是运行的密码查询。 我试图用Neo4j服务器的-Xmx1024m选项来增加JVM堆空间,但这没有帮助。将不胜感激任何其他建议。
未处理的异常:System.ApplicationException:执行请求时收到意外的HTTP st atus。
查询是:
START X =节点(1213997)
MATCH X - [:BOM * 1..5] - >Ñ RETURN 'BOM' AS的RelationshipType,n.Number? AS编号,n.Id?为ID
响应状态为:500 Java堆空间
The raw response body was: <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 500 Java heap space</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /db/data/cypher. Reason:
<pre> Java heap space</pre></p><h3>Caused by:</h3><pre>java.lang.OutOfMemoryE
rror: Java heap space
at java.lang.AbstractStringBuilder.<init>(Unknown Source)
at java.lang.StringBuilder.<init>(Unknown Source)
at org.neo4j.server.rest.repr.RepresentationType.<init>(Representa
tionType.java:108)
at org.neo4j.server.rest.repr.Representation.<init>(Representation
.java:73)
at org.neo4j.server.rest.repr.ListRepresentation.<init>(ListRepres
entation.java:36)
at org.neo4j.server.rest.repr.CypherResultRepresentation.data(CypherResu
ltRepresentation.java:64)
请详细解释一下你的目标是什么与这个查询。它似乎没有太多目的列出大量数据。 – 2012-03-08 18:03:32
要求是从根节点开始获取整个产品或文档结构。所以,在大多数情况下,数据大小不会太大,我试图找到这样的查询的边界条件。 – 2012-03-09 06:35:08
你有没有尝试分页结果,看看是否有帮助?针对1.8版本的 – 2012-03-09 12:56:03