首页 文章

如何正确配置GraphDb内存

提问于
浏览
0

我在研究项目中使用GraphDb Free 8.6.1,我在具有4GB内存的linux服务器上使用默认配置运行它 .

但是,它已经开始抛出指向内存不足的异常:

Caused by: org.eclipse.rdf4j.repository.RepositoryException: Query evaluation error: Insufficient free Heap Memory 238Mb for group by and distinct, threshold:250Mb, reached 0Mb (HTTP status 500)
    at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.execute(SPARQLProtocolSession.java:1143)
    at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.executeOK(SPARQLProtocolSession.java:1066)
    at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.sendTupleQueryViaHttp(SPARQLProtocolSession.java:834)
    at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.getTupleQueryResult(SPARQLProtocolSession.java:763)
    at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.sendTupleQuery(SPARQLProtocolSession.java:391)
    at org.eclipse.rdf4j.repository.http.HTTPTupleQuery.evaluate(HTTPTupleQuery.java:69)

拜托,你能帮我辨认一下这个问题吗?如何正确配置GraphDB?

1 回答

  • 2

    您观察到的行为是不同/分组操作的内存优化的一部分 . 错误消息本身与250 MB的默认阈值相关,它可以让您知道需要调整内存 . 当空闲堆内存小于阈值时,抛出QueryEvaluationException,以避免由于饥饿的distinct / group by操作而耗尽内存 . 您可以通过在启动GraphDB“-Ddefaut.min.distinct.threshold = XXX”(可以设置为阈值的内存量)时通过传递以下参数来调整阈值以最小化这些错误 . .

    Insufficient free Heap Memory 238Mb for group by and distinct, threshold:250Mb, reached 0Mb
    238Mb = free heap space reported by the JVM
    250Mb = the default threshold below which the protection should raise an exception to prevent OME
    0Mb = the current buffer used for distinct and group by
    

    我怀疑另一个操作占用了你的大部分RAM,一旦你运行任何DISTINCT / GROUP BY查询,它会因为OME保护而立即停止 .

相关问题