云函数没有执行完毕就直接返回了
发布于 5 年前 作者 liutao 11573 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)

云函数日志如下,在云函数中的逻辑没有执行完毕直接返回了!

2019-04-14T07:01:35.910Z ced9b3cf-5e82-11e9-833c-525400e8849e Database operation is longer than 3s. Please check query performance and your network environment.

2019-04-14T07:01:35.910Z ced9b3cf-5e82-11e9-833c-525400e8849e Database operation is longer than 3s. Please check query performance and your network environment.

2019-04-14T07:01:35.911Z ced9b3cf-5e82-11e9-833c-525400e8849e (node:13) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): Error: ETIMEDOUT

2019-04-14T07:01:35.911Z ced9b3cf-5e82-11e9-833c-525400e8849e (node:13) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): Error: ETIMEDOUT

1 回复

云函数里遇到报错,而你又没有捕获,就会直接返回了,符合Promise的特性

你这函数是什么操作啊,数据库查询超过3s

回到顶部