我的后端使用了微信云托管,设置了最小实例副本数量是:1
但是每次等几个小时,进入小程序,就会出现接口请求超时的情况。超时后,点击按钮再次请求数据,又能秒拿数据。
报错的请求:
测试出来,每隔30分钟,第一次请求必超时。看后端日志,第一次请求并未达到后端,后端没日志。
但是只要第一次请求超时后,再次请求,就是秒级响应
获取食品生产商数据失败: 15:12:19 normal poll->15:12:22 normal poll->15:12:25 normal poll->15:12:28 normal poll->15:12:31 system error (Error: errCode: 102002 | errMsg: 请求超时. For more information, please refer to https://developers.weixin.qq.com/miniprogram/dev/wxcloudrun/src/development/call/faq.html), abort)>
fail@https://usr//appservice.app.js:155:1652
p@https://lib/WAServiceMainContext.js:1:157898
q@https://lib/WACloud.js:1:257946
@https://lib/WACloud.js:1:258842
$@https://lib/WACloud.js:1:258846
@https://lib/WACloud.js:1:332528
q@https://lib/WASubContext.js:1:58003
@https://lib/WASubContext.js:1:58229
C@https://lib/WASubContext.js:1:36075
看下数据库的设置,是不是会自动关闭
30分钟没请求,然后30分钟后的第一次请求必超时