尽管堆大小增加,但 ArangoDB Graph Traversal 失败 [英] ArangoDB Graph Traversal fails inspite of increased heap size

查看:26
本文介绍了尽管堆大小增加,但 ArangoDB Graph Traversal 失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ArangoDB 版本:3.3.14

ArangoDB Version: 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,dos_zap_garbage: 0 }

Heap Statistics for application: { 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 }

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

I have a traversal api which traverses through 3 vertices and returns around 300 document vertices. For 200 I get the proper response but when I increase the number of vertices to 300, the traversal api throws an error invalid string length. I have increased the heap space for application to 8GB but as can be seen below the heap_used is way far too less. I am quite not sure if this issue is during serialization to JSON as there is sufficient heap memory available or are there any other options available to get the complete data.

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_related_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 connection;"},"collection_name":"","edge_name":"","data":true,"path":false}},"err":{"code":500,"message":"无效的字符串长度"}}

AQL query (if applicable): {"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"}}

推荐答案

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

The error message you're seeing here is a V8 error message, thus this is a javscript implementation limitation. V8 allows strings up to 256 MB.

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

The old graph traversal API is implemented in Javascript, and for processing may stringify documents inbetween and thus reach this limit.

首选 AQL-Traversals 以获得更好的性能.

Please prefer AQL-Traversals instead for better performance.

这篇关于尽管堆大小增加,但 ArangoDB Graph Traversal 失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆