云函数有一定概率失败,麻烦棒忙排查:
失败的请求:请求入参: {
"args": {
"action": "getChatlist",
"params": {
"to_uid": "61adf09481337a00013fc3ee"
},
"clientInfo": {
"PLATFORM": "mp-weixin",
"OS": "devtools",
"APPID": "UNIF150529",
"LOCALE": "zh-Hans",
"DEVICEID": "16389380767333621159",
"CLIENT_SDK_VERSION": "1.0.14"
},
"uniIdToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiI2MWFkZjA5NDgxMzM3YTAwMDEzZmMzZWUiLCJyb2xlIjpbIlVTRVIiXSwicGVybWlzc2lvbiI6WyJOT1RJQ0VfQUREIiwiTk9USUNFX0VESVQiLCJOT1RJQ0VfREVMIl0sImlhdCI6MTYzODk3NTM5MSwiZXhwIjoxNjM4OTgyNTkxfQ.Z3JzNCjens1psZqtrjblo5vwfU6BMFKXIeokV4tb_7o"
},
"requestId": "ac1406941638975396456111358"
}
[message/ac1406941638975396456111358/1ms/DEBUG] event : { action: 'getChatlist',
params: { to_uid: '61adf09481337a00013fc3ee' },
uniIdToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiI2MWFkZjA5NDgxMzM3YTAwMDEzZmMzZWUiLCJyb2xlIjpbIlVTRVIiXSwicGVybWlzc2lvbiI6WyJOT1RJQ0VfQUREIiwiTk9USUNFX0VESVQiLCJOT1RJQ0VfREVMIl0sImlhdCI6MTYzODk3NTM5MSwiZXhwIjoxNjM4OTgyNTkxfQ.Z3JzNCjens1psZqtrjblo5vwfU6BMFKXIeokV4tb_7o' }
成功的:请求入参: {
"args": {
"action": "getChatlist",
"params": {
"to_uid": "61adf09481337a00013fc3ee"
},
"clientInfo": {
"PLATFORM": "mp-weixin",
"OS": "devtools",
"APPID": "UNIF150529",
"LOCALE": "zh-Hans",
"DEVICEID": "16389380767333621159",
"CLIENT_SDK_VERSION": "1.0.14"
},
"uniIdToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiI2MWFkZjA5NDgxMzM3YTAwMDEzZmMzZWUiLCJyb2xlIjpbIlVTRVIiXSwicGVybWlzc2lvbiI6WyJOT1RJQ0VfQUREIiwiTk9USUNFX0VESVQiLCJOT1RJQ0VfREVMIl0sImlhdCI6MTYzODk3MzY3MCwiZXhwIjoxNjM4OTgwODcwfQ.TgCTmBBaNez0NUCHT8Y2brnqwpMZKcTvkrdfVt0y_tg"
},
"requestId": "ac141d161638975305230187286"
}
[message/ac141d161638975305230187286/1ms/DEBUG] event : { action: 'getChatlist',
params: { to_uid: '61adf09481337a00013fc3ee' },
uniIdToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiI2MWFkZjA5NDgxMzM3YTAwMDEzZmMzZWUiLCJyb2xlIjpbIlVTRVIiXSwicGVybWlzc2lvbiI6WyJOT1RJQ0VfQUREIiwiTk9USUNFX0VESVQiLCJOT1RJQ0VfREVMIl0sImlhdCI6MTYzODk3MzY3MCwiZXhwIjoxNjM4OTgwODcwfQ.TgCTmBBaNez0NUCHT8Y2brnqwpMZKcTvkrdfVt0y_tg' }
请求响应状态: success
6 个回复
最佳回复
DCloud_uniCloud_WYQ
此问题由复用aggregate实例引起。文档已补充说明
以下两种写法均为错误示例:
cody_liu (作者)
这是执行的sql
DCloud_uniCloud_WYQ
失败的时候前端收到的错误信息是什么?to_uid有没有添加索引,集合记录数量大不大
cody_liu (作者)
前端没有错误,没添加索引,to_uid有添加uni-id-users的外键,只有四条数据
2021-12-09 11:37
DCloud_uniCloud_WYQ
回复 cody_liu: 没有错误是收到正确的响应了吗?判断是否失败只是从云函数的日志里面看的是吗
2021-12-09 11:39
cody_liu (作者)
回复 DCloud_uniCloud_WYQ: 对的
2021-12-09 11:42
cody_liu (作者)
回复 DCloud_uniCloud_WYQ: 上面的日志就是从云函数日志拷贝出来的
2021-12-09 11:43
cody_liu (作者)
回复 DCloud_uniCloud_WYQ: 感谢大佬
2021-12-09 15:59
cody_liu (作者)
这是表结构
cody_liu (作者)
这笔又失败了,刚刚请求的
cody_liu (作者)
这是云函数日志