我的 PGX API of Oracle 有问题.
我加载了一个大图并应用了连续的过滤器,但在计算一些计算后我破坏了临时图。
GraphChangeSet<Integer> subGraphChangeSet =
currentSubGraph.createChangeSet();
list.forEach(v -> subGraphChangeSet.updateVertex((Integer) v.getId())
.setProperty("BLOCKED", true));
PgxGraph subGraphForRequest = subGraphChangeSet.build();
// ...
PgxGraph subGraphFiltered = subGraphForRequest
.filter(new VertexFilter("vertex.BLOCKED == true"));
float edges = (float) subGraphFiltered.getNumEdges();
PgqlResultSet results = subGraphFiltered.queryPgql("SELECT label(e), COUNT(*) " +
"MATCH () -[e]-> () GROUP BY label(e) ");
for (PgxResult result: results)
map.put(property, (float) result.getLong(2) / edges);
subGraphFiltered.destroy();
subGraphForRequest.destroy();
但是当我尝试执行查询时,出现 [ERROR] OutOfMemoryError: QUERY_PGQL failed Maximum off-heap size isconfigured to not超过 8,192 MBs.
异常。
所以我尝试使用VM OPTS -Xms512m -Xmx4g,但PGX仍然忽略这些参数。我什至尝试 -XX:-UseGCOverheadLimit 但什么也没发生。我尝试修改 pgx.conf
文件以更改 max_off_heap_size
参数的值,但也没有任何反应。
最佳答案
经过更多研究,我在文档中发现我们可以使用系统属性
System properties
Also, any PGX engine or runtime field can be set via Java system properties by writing -Dpgx.= arguments to the JVM PGX is running on. Note: Setting system properties will overwrite any other configuration. For example, to set the max off-heap size to 256GB, regardless of what another configurations says, use
java -Dpgx.max_off_heap_size=256000 ...
这对我有用。
关于oracle - Pgx 内存不足错误 : maximum off-heap size is configured to not exceed 8, 192 MB,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51077393/