yiyungent / KnifeHub

🧰 简单易用的效率工具平台
http://yiyungent.github.io/KnifeHub/
Apache License 2.0
445 stars 62 forks source link

内存泄露 #9

Open yiyungent opened 2 years ago

yiyungent commented 2 years ago

我刚测试发现 QQBotHub 啥插件都不加载,啥子都不做,内存占用++,
我的 OneTree(同样用了PluginCore),加载了一些插件,但内存占用一直没变

1. OneTree (PluginCore, 加载少量插件, 长时间运行, Portainer)

image

2. QQBotHub (PluginCore, 未加载插件,空新启动项目, Portainer)

一开始启动 27MB 左右, 内存++速度非常快!

image

3. QQBotHub (PluginCore, 加载大量插件,长时间运行, Railway)

image

yiyungent commented 2 years ago

排除 knt.Core 问题

image

yiyungent commented 2 years ago

本地 Visual Studio QQBotHub

image

等了会,目测一直稳在 84MB

image

yiyungent commented 2 years ago

经过长时间,Portainer 显示 qqbothub 逐渐稳定在 80+MB , 奇怪 , Railway 怎么会这么高占用,

有时间再测试一下插件

yiyungent commented 2 years ago

2. QQBotHub (PluginCore, 未加载插件,空新启动项目, Portainer)

过了2小时左右

image

yiyungent commented 2 years ago

经过反复实验

确定是 PluginCore.AspNetCore.BackgroundServices.PluginTimeJobBackgroundService.DoWork(object state) 的问题

反复执行任务,然而 插件实例 目测 没有成功被 GC 回收

yiyungent commented 2 years ago

已在 qqbothub:v0.5.3 得到修复