我的规格:增加堆空间可供JVM:OutOfMemoryError错误:请求的数组大小超过VM限制的Ubuntu 64位的Neo4j 2.0
-Ubuntu 64
-Neo4j 2.0
-32 GB的RAM的
-AMD FX-8350八核处理器
问题:
我正在做我的Neo4j服务器的请求用下面的查询:
MATCH (being:my_label_2) RETURN being
,给我这个错误:
OutOfMemoryError
Requested array size exceeds VM limit
StackTrace:
java.lang.StringCoding$StringEncoder.encode(StringCoding.java:300)
java.lang.StringCoding.encode(StringCoding.java:344)
java.lang.String.getBytes(String.java:916)
org.neo4j.server.rest.repr.OutputFormat.toBytes(OutputFormat.java:194)
org.neo4j.server.rest.repr.OutputFormat.formatRepresentation(OutputFormat.java:147)
org.neo4j.server.rest.repr.OutputFormat.response(OutputFormat.java:130)
org.neo4j.server.rest.repr.OutputFormat.ok(OutputFormat.java:67)
org.neo4j.server.rest.web.CypherService.cypher(CypherService.java:101)
java.lang.reflect.Method.invoke(Method.java:606)
org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:139)
org.neo4j.server.rest.security.SecurityFilter.doFilter(SecurityFilter.java:112)
这正常工作与“my_label_1”返回各地30k结果
我认为是什么问题:
我没有足够的内存分配给我的JVM作出修正/东西
尝试,我在网上找到的:
I read what the manual says to do
And what the Ubuntu Forums say to do
所以我试着去我的neo4文件夹(像往常一样cd),并用这种方式运行它的参数:
sudo bin/neo4j start -Xmx4096M
但是没有奏效。当Neo4j的启动它提醒我,我可能不会有足够的空间:
WARNING: Max 1024 open files allowed, minimum of 40 000 recommended. See the Neo4j manual.
Using additional JVM arguments: -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled
问题
我知道我肯定使用的参数错误,我真的不有太多的经验JVM配置。我该如何解决这个问题,我是否错过了一些东西?
使用标题X-Stream:true,然后结果将流式传输到客户端。你首先如何提出你的要求? –