【问题标题】:ArangoDB Graph Traversal fails inspite of increased heap size尽管堆大小增加,但 ArangoDB 图形遍历失败
【发布时间】:2019-02-28 01:19:02
【问题描述】:

ArangoDB 版本:3.3.14

应用程序的堆统计信息: { total_heap_size: 39108608, total_heap_size_executable: 3670016, total_physical_size: 37433512, total_available_size: 8735662896, used_heap_size: 28891504, heap_size_limit: 8769069275, malloced_memory: 16384, peak_malloced_memory: 168484640, does_zap_garbage: 0 }

我有一个遍历 3 个顶点并返回大约 300 个文档顶点的遍历 api。 对于 200,我得到了正确的响应,但是当我将顶点数增加到 300 时,遍历 api 会抛出错误无效字符串长度。我已将应用程序的堆空间增加到 8GB,但从下面可以看出 heap_used 太少了。我不太确定这个问题是否是在序列化为 JSON 的过程中,因为有足够的堆内存可用,或者是否有任何其他选项可用于获取完整数据。

AQL 查询(如果适用): {"request":{"vertex":"start_vertex","start_vertex":"service_teams/9a2e582997494bee9066bbcf2aa52218","start_vertices":null,"opts":{"expander":"var connections = [];\n config.datasource.getOutEdges(vertex).forEach(function (e) {\n if( (e._id.indexOf(\"loc_has_parent_loc\") > -1) || (e._id.indexOf(\"loc_is_associated_with_org\") > -1) || (e._id.indexOf(\"st_is_allocated_loc\") > -1) ) {\n connections.push({ vertex: require(\"internal\").db._document(e._to), edge: e});\n }\n });\n return connections;"},"collection_name":"","edge_name":"","data":true,"path":false}},"err":{"code":500,"message":"Invalid string length"}}

【问题讨论】:

    标签: arangodb


    【解决方案1】:

    您在此处看到的错误消息是 V8 错误消息,因此这是 javscript 实现的限制。 V8 允许最大 256 MB 的字符串。

    旧的图遍历 API 是用 Javascript 实现的,为了处理可能会在中间对文档进行字符串化,从而达到这个限制。

    prefer AQL-Traversals instead 以获得更好的性能。

    【讨论】:

      猜你喜欢
      • 2012-04-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多