小栈
小栈
  • 发布:2022-08-02 12:08
  • 更新:2024-04-07 14:44
  • 阅读:533

unicloude云数据库聚合操作缺少allowDiskUse属性设置,数据量大时报错

分类:uniCloud

unicloude云数据库聚合操作缺少allowDiskUse属性,数据量大时报错:
Sort exceeded memory limit of 104857600 bytes, but did not opt in to external sorting. Aborting operation. Pass allowDiskUse:true to opt in

2022-08-02 12:08 负责人:无 分享
已邀请:
DCloud_uniCloud_WYQ

DCloud_uniCloud_WYQ

目前云厂商未透出此选项,可以详细描述下你的需求吗

小栈

小栈 (作者)

问题:文章表有12940条记录,(按每页10条记录)分页读取第1294页的记录时报错:errCode: InternalServerError | errMsg: Command failed with error 16820 (Location16820): 'Sort exceeded memory limit of 104857600 bytes, but did not opt in to external sorting. Aborting operation. Pass allowDiskUse:true to opt in.' on server 192.168.146.95:3717. The full response is { "operationTime" : { "$timestamp" : { "t" : 1659436866, "i" : 28 } }, "ok" : 0.0, "errmsg" : "Sort exceeded memory limit of 104857600 bytes, but did not opt in to external sorting. Aborting operation. Pass allowDiskUse:true to opt in.", "code" : 16820, "codeName" : "Location16820", "$clusterTime" : { "clusterTime" : { "$timestamp" : { "t" : 1659436866, "i" : 28 } }, "signature" : { "hash" : { "$binary" : "eXLJWp/uiCY+KJc8UeOuX8MYtGs=", "$type" : "00" }, "keyId" : { "$numberLong" : "7089440913344167945" } } } }
需求:聚合查询aggregate正常读取第1294页的数据

  • 李白丨

    解决了吗?大佬

    2024-03-14 10:39

小栈

小栈 (作者)

问题:聚合函数使用orderBy排序,数据量大时,提示内存不足导致查询失败,提示斛决方案:设置allowDiskUse:true,然当前unicloud不支持allowDiskUse设置

五行缺码

五行缺码

我也遇到这个问题了。这个问题怎么解决呀?InternalServerError:Command failed with error 16820 (Location16820): 'Sort exceeded memory limit of 104857600 bytes, but did not opt in to external sorting. Aborting operation. Pass allowDiskUse:true to opt in.'

  • 李白丨

    解决了吗大佬

    2024-03-14 10:39

小栈

小栈 (作者)

我后面用建立索引方式解决的这个问题

要回复问题请先登录注册