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

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

问题描述

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, does_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_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"}}

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图形遍历失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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