gpt4 book ai didi

graphdb - 如何正确配置 GraphDb 内存

转载 作者:行者123 更新时间:2023-12-04 01:28:30 27 4
gpt4 key购买 nike

我在研究项目中使用 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?

最佳答案

您观察到的行为是 distinct/group by 操作的内存优化的一部分。错误消息本身与 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 保护。

关于graphdb - 如何正确配置 GraphDb 内存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52095005/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com