incubator-hugegraph icon indicating copy to clipboard operation
incubator-hugegraph copied to clipboard

gremlin 语句请求数据量过大时超时

Open liangshuang110 opened this issue 6 years ago • 6 comments

数据量过大时,不加limit()请求超时,如何在不加limit()情况下解决超时问题; 将restserver.request_timeout设置为-1是否可以解决

liangshuang110 avatar Oct 15 '20 02:10 liangshuang110

@liangshuang110 由于同步请求过多数据不超时意味着内存可能OOM,建议增加条件使得结果返回减小,或者使用分页API进行全量数据获取。

javeme avatar Oct 16 '20 12:10 javeme

只有这俩种解决办法吗?我想在studio上输入gremlin语句展示top5个边最多的点,但由于数据量大于80w所以报错,如果用分页api的话就展示不了图了,请问我想在studio上展示数据量大于80w数据的top5个边最多的点能满足需求吗?

liangshuang110 avatar Oct 19 '20 02:10 liangshuang110

@liangshuang110 建议把语句贴出来,通用的话可以减少渲染的数据,比如g.V(id1,id2,id3,id4,id5).local(both().limit(10)).path()

javeme avatar Oct 19 '20 03:10 javeme

主要是数据量大于80w了并不知道那5个顶点id是多少? 我的语句g.V().hasLabel('Entity').limit(10000).where(out().count().is(lte(g.V().hasLabel('Entity').limit(10000).map(outE().count()).max()[0]))).order().by(outE().count()).tail(5),如果不加limit就会报错

liangshuang110 avatar Oct 19 '20 05:10 liangshuang110

@liangshuang110 这种场景建议使用离线计算的方式,使用度中心性进行计算。

javeme avatar Oct 19 '20 05:10 javeme

Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label

github-actions[bot] avatar Jun 30 '21 21:06 github-actions[bot]