2020-01-16 18:11 云函数定时任务报了一波错误,具体报错详情见下面错误信息
发布于 7 年前 作者 jieyin 12363 次浏览 来自 官方Issues

更新备注:的确使用了 promise.all + reduce 方法取出的全量数据,但是目前库里只有3条数据,还是会偶发性的报 -501004;

18:11 分 集中报了一波错,大概 14 条:

{
  "message": "errCode: -501004 exceed concurrent request limit | errMsg: [LimitExceeded.NoValidConnection] Connection num overrun. Please improve specifications, but if the problem cannot be solved, contact us.; ",
  "name": "",
  "stack": "Error: errCode: -501004 exceed concurrent request limit | errMsg: [LimitExceeded.NoValidConnection] Connection num overrun. Please improve specifications, but if the problem cannot be solved, contact us.; \n    at Object.returnAsCloudSDKError (/var/user/node_modules/wx-server-sdk/index.js:6052:16)\n    at Object.checkError (/var/user/node_modules/wx-server-sdk/index.js:1378:23)\n    at Promise (/var/user/node_modules/wx-server-sdk/index.js:1508:33)\n    at \n    at process._tickCallback (internal/process/next_tick.js:188:7)",
  "userInfo": {
    "appId": "wx4bfbc8e64eff19eb"
  }
}

然后登陆云函数后台查看日志发现,下面提示

日志内容 Request ID: 4c830adf-14b7-4fff-b2cd-3487add8034f
执行时间: 9372.41ms内存使用: 37.93 MB
返回结果 null

日志
START RequestId: 4c830adf-14b7-4fff-b2cd-3487add8034f

Event RequestId: 4c830adf-14b7-4fff-b2cd-3487add8034f

2020-01-16T10:11:53.154Z  Database operation database.queryDocument is longer than 3s. Please check query performance and your network environment.

 
END RequestId: 4c830adf-14b7-4fff-b2cd-3487add8034f

Report RequestId: 4c830adf-14b7-4fff-b2cd-3487add8034f Duration:9372ms Memory:256MB MaxMemoryUsed:37.929688MB

大概从 17: 57 开始,执行时间由 70ms 升到 3、4 秒,中间甚至十几秒,到 18: 11 分后定时任务停止。

4 回复

我也遇到这个问题了。。。

2020.01.19 16:35 又报了一波,没有官方人员解答一下吗,搞得定时任务不敢正式使用了,频繁的崩溃,唉

是不是超出云开发的套餐限制了?

回到顶部