oracle - Pgx 内存不足错误 : maximum off-heap size is configured to not exceed 8, 192 MB

标签 oracle java-8 pgx

我的 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 ...

PGX Doc

这对我有用。

关于oracle - Pgx 内存不足错误 : maximum off-heap size is configured to not exceed 8, 192 MB,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51077393/

相关文章:

java - 无法使用 JDK11 javac 为仅变量类文件创建 JNI 头文件

postgresql - 如何将 pgtype.Int4Array(来自 pgx 库)转换为 []int64 Golang 类型?

oracle - Apex 4 错误 : Schema restricted or reserved

java - 在 Netbeans Maven 项目中添加 JDBC

Java 8 Stream 修改可变变量

Java 8 可选返回类型

arrays - 使用 pgx 使用 JSONBArray 时出现 "wrong element type"

postgresql - 使用 pgx 扫描范围类型

oracle - 确定相关 tnsnames.ora 文件的位置

database - 使用 Oracle 12C 使用 match_recognize 查找损坏的序列