MountainDash / nonebot-bison

A nonebot2 plugin to repost social media posts to QQ group
https://nonebot-bison.netlify.app
MIT License
164 stars 35 forks source link

不断提醒警告信息 #250

Open sherlockHlb opened 1 year ago

sherlockHlb commented 1 year ago

最新版,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

AzideCupric commented 1 year ago

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

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

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

felinae98 commented 1 year ago

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

sherlockHlb commented 1 year ago

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

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

sherlockHlb commented 1 year ago

环境

问题

一直报错

日志


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

包括现在也还在报错

AzideCupric commented 1 year ago
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,因此产生警告