Neo4j堆大小

时间:2016-03-31 18:47:27

标签: java neo4j heap

当我在两个不同的Linux服务器上运行具有相同JVM参数的java嵌入式Neo4j程序时,一个具有24个内核和64G RAM的程序成功完成了这项工作,但另一个给了我堆大小错误,尽管它有768G RAM和32个内核。错误发生在代码的这一行: graphDb = new GraphDatabaseFactory()。newEmbeddedDatabaseBuilder(PATH + GRAPH_DATABASE_PATH)                     .setConfig(“keep_logical_logs”,“100M size”)。newGraphDatabase();

我在两次运行中都设置了-Xmx4g。由于许多用户共享此计算机,错误是否与用户数量和第二台服务器上的负载有某种关系?这是我收到的错误: 线程“main”中的异常java.lang.OutOfMemoryError:Java堆空间         在org.neo4j.io.pagecache.impl.muninn.MuninnPageCache。(MuninnPageCache.java:246)         在org.neo4j.kernel.impl.pagecache.ConfiguringPageCacheFactory.createPageCache(ConfiguringPageCacheFactory.java:94)         在org.neo4j.kernel.impl.pagecache.ConfiguringPageCacheFactory.getOrCreatePageCache(InstallingPageCacheFactory.java:85)         在org.neo4j.kernel.impl.factory.PlatformModule.createPageCache(PlatformModule.java:279)         在org.neo4j.kernel.impl.factory.PlatformModule。(PlatformModule.java:156)         at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.createPlatform(GraphDatabaseFacadeFactory.java:181)         在org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:124)         在org.neo4j.kernel.impl.factory.CommunityFacadeFactory.newFacade(CommunityFacadeFactory.java:43)         在org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:108)         at org.neo4j.graphdb.factory.GraphDatabaseFactory.newDatabase(GraphDatabaseFactory.java:129)         at org.neo4j.graphdb.factory.GraphDatabaseFactory $ 1.newDatabase(GraphDatabaseFactory.java:117)         at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:185)

1 个答案:

答案 0 :(得分:0)

只需明确配置页面缓存大小:

dbms.pagecache.memory=5G

取决于磁盘上的存储大小。