MountainDash/nonebot-bison

不断提醒警告信息

Opened this issue · 5 comments

最新版,nonebot2 v11
不断提醒以下错误

04-30 02:43:46 [WARNING] logging | Run time of job "Scheduler.exec_fetch (trigger: interval[0:00:03], next run at: 2023-04-30 02:43:47 CST)" was missed by 0:00:01.969608
04-30 02:43:46 [WARNING] logging | Run time of job "Scheduler.exec_fetch (trigger: interval[0:00:10], next run at: 2023-04-30 02:43:49 CST)" was missed by 0:00:06.157668
04-30 02:45:29 [WARNING] logging | Execution of job "Scheduler.exec_fetch (trigger: interval[0:00:03], next run at: 2023-04-30 02:45:29 CST)" skipped: maximum number of running instances reached (1)
04-30 02:45:30 [WARNING] nonebot_bison | network connection error: <class 'httpx.ReadTimeout'>, url: https://m.weibo.cn/api/container/getIndex?containerid=1076032219124641

https://github.com/felinae98/nonebot-bison/blob/7b2723817eda3e5a1fa4f5f18dca31d58d9eef9d/docs/usage/README.md?plain=1#L158

network connection error可以关闭(未知原因对文档的修改没有被同步到网站上所以文档网站没显示这条配置
但是Scheduler的Warning现在还不能关(大概

另外,issue模板是个好东西,建议使用它

这个错误是一直在报吗,还是间断的

这个错误是一直在报吗,还是间断的

一直呢。不知道是哪里的同步时差的问题?

环境

  • nonebot-bison 版本:0.7.1
  • nonebot 版本:v11
  • 安装方式:(以下方式的一种或者其他方式)
    1. 通过 nb-cli 安装
  • 操作系统:
    Microsoft Windows Server 2019 Datacenter

问题

一直报错

日志


05-02 21:15:19 [WARNING] logging | Execution of job "Scheduler.exec_fetch (trigger: interval[0:00:03], next run at: 2023-05-02 21:15:19 CST)" skipped: maximum number of running instances reached (1)
05-02 21:15:20 [WARNING] nonebot_bison | network connection error: <class 'httpx.ReadTimeout'>, url: https://m.weibo.cn/api/container/getIndex?containerid=1076032219124641

包括现在也还在报错

05-02 21:15:19 [WARNING] logging | Execution of job "Scheduler.exec_fetch (trigger: interval[0:00:03], next run at: 2023-05-02 21:15:19 CST)" skipped: maximum number of running instances reached (1)
05-02 21:15:20 [WARNING] nonebot_bison | network connection error: <class 'httpx.ReadTimeout'>, url: https://m.weibo.cn/api/container/getIndex?containerid=1076032219124641

目前推测是因为bison对微博是每3秒请求一次,而httpx请求的超时时间是5s,这会导致上一个定时任务httpx的请求还没结束,下一个定时任务就已经开启了,导致同一时间该定时任务有两个实例存在,而scheduler最大实例默认设置为1,因此产生警告