Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] CPU和内存占用异常 #556

Closed
woolsen opened this issue Nov 20, 2024 · 5 comments
Closed

[BUG] CPU和内存占用异常 #556

woolsen opened this issue Nov 20, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@woolsen
Copy link

woolsen commented Nov 20, 2024

系统版本

Windows Server 2019 and Ubuntu 22.04 docker

QQNT 版本

9.9.16-29456

NapCat 版本

4.1.6

OneBot 客户端

Shiro - java sdk

发生了什么?

随着运行时间增加,内存占用逐渐上升,最终会到达800多mb,其他机器人普遍为100mb
CPU占用也相对其他机器人明显偏高
日志显示,不断的对指定QQ号在各个群聊做查询并报错

该问题在windows server 2019和ubuntu22.04的docker容器上稳定复现
PS:日志中群号和qq号做了脱敏处理
image

如何复现

机器人约400个群

期望的结果?

CPU和内存占用相对稳定

NapCat 运行日志

11-21 03:53:40 [error] 发生错误 Error: 群(653964***)成员1256***382不存在
    at GetGroupMemberInfo._handle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50844:24)
    at async GetGroupMemberInfo.websocketHandle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50334:23)
    at async OB11ActiveWebSocketAdapter.handleMessage (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:35428:21)
11-21 03:54:25 [error] 发生错误 Error: 群(700765***)成员1256***382不存在
    at GetGroupMemberInfo._handle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50844:24)
    at async GetGroupMemberInfo.websocketHandle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50334:23)
    at async OB11ActiveWebSocketAdapter.handleMessage (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:35428:21)
11-21 03:54:31 [error] 发生错误 Error: 群(910457***)成员1256***382不存在
    at GetGroupMemberInfo._handle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50844:24)
    at async GetGroupMemberInfo.websocketHandle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50334:23)
    at async OB11ActiveWebSocketAdapter.handleMessage (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:35428:21)
11-21 03:54:43 [error] 发生错误 Error: 群(543693***)成员1256***382不存在
    at GetGroupMemberInfo._handle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50844:24)
    at async GetGroupMemberInfo.websocketHandle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50334:23)
    at async OB11ActiveWebSocketAdapter.handleMessage (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:35428:21)
11-21 03:55:57 [error] 发生错误 Error: 群(907174***)成员1256***382不存在
    at GetGroupMemberInfo._handle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50844:24)
    at async GetGroupMemberInfo.websocketHandle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50334:23)
    at async OB11ActiveWebSocketAdapter.handleMessage (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:35428:21)
11-21 03:56:08 [error] 发生错误 Error: 群(1106549***)成员1256***382不存在
    at GetGroupMemberInfo._handle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50844:24)
    at async GetGroupMemberInfo.websocketHandle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50334:23)
    at async OB11ActiveWebSocketAdapter.handleMessage (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:35428:21)
11-21 03:56:48 [error] 发生错误 Error: 群(820399***)成员1256***382不存在
    at GetGroupMemberInfo._handle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50844:24)
    at async GetGroupMemberInfo.websocketHandle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50334:23)
    at async OB11ActiveWebSocketAdapter.handleMessage (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:35428:21)
11-21 03:57:00 [error] 发生错误 Error: 群(826519***)成员1256***382不存在
    at GetGroupMemberInfo._handle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50844:24)
    at async GetGroupMemberInfo.websocketHandle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50334:23)
    at async OB11ActiveWebSocketAdapter.handleMessage (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:35428:21)
11-21 03:58:30 [error] 发生错误 Error: 群(528849***)成员1256***382不存在
    at GetGroupMemberInfo._handle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50844:24)
    at async GetGroupMemberInfo.websocketHandle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50334:23)
    at async OB11ActiveWebSocketAdapter.handleMessage (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:35428:21)
11-21 03:58:42 [error] 发生错误 Error: 群(709871***)成员1256***382不存在
    at GetGroupMemberInfo._handle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50844:24)
    at async GetGroupMemberInfo.websocketHandle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50334:23)
    at async OB11ActiveWebSocketAdapter.handleMessage (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:35428:21)
11-21 03:58:47 [error] 发生错误 Error: 群(1160537***)成员1256***382不存在
    at GetGroupMemberInfo._handle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50844:24)
    at async GetGroupMemberInfo.websocketHandle (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:50334:23)
    at async OB11ActiveWebSocketAdapter.handleMessage (file:///C:/Users/Administrator/Desktop/NapcatDesktop/NapCat/napcat.mjs:35428:21)

OneBot 客户端运行日志

@woolsen woolsen added the bug Something isn't working label Nov 20, 2024
@xmexg
Copy link

xmexg commented Nov 20, 2024

合影!

在此记录QQ内存突破17GB!
Image_912930104915106

@MliKiowa
Copy link
Member

这部分应用端乱调用吗

@MliKiowa MliKiowa self-assigned this Nov 21, 2024
@devil233-ui
Copy link

我不久前本地win也遇到了,未使用任何协议端,只使用了llnt。当时解决方案是删掉了早期修补用的dbghelp.dll,所以这感觉是patch检测这块的问题?
刚好我的服务器也是ub22,这就去逝世

@woolsen
Copy link
Author

woolsen commented Nov 22, 2024

这部分应用端乱调用吗

检查了下应用端,查询报错是因为我应用导致的,和内存占用偏大问题无关。
怀疑内存占用偏大,可能为群成员缓存导致的?

@MliKiowa
Copy link
Member

这部分应用端乱调用吗

检查了下应用端,查询报错是因为我应用导致的,和内存占用偏大问题无关。 怀疑内存占用偏大,可能为群成员缓存导致的?

暂时没有头绪 如果有进展再跟进

@MliKiowa MliKiowa closed this as not planned Won't fix, can't repro, duplicate, stale Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants