alireza0 修复 s-ui 两处内存增长路径,计划随下个版本发布

alireza0 在 s-ui #1294 中说明,旧连接跟踪、HTTP 重启、DB WAL 和 SQLite 泄漏修复早已进入上游,当前报告并非同一泄漏复发。他排查 v1.6.x 时修复了两处无界增长:Hysteria、Hysteria2、TUIC 入站的客户端地址会话表现在会定期清理空闲项;流量统计持续保存失败时,未保存流量改为按资源合并并分批保存。作者称这些修复会进入下个版本,仍需报告者补充版本、入站类型和统计错误等信息,以确认是否解释其现场。

作者原文

Thanks for the detailed report.

First, a correction: the #1056 fixes you mentioned (conn tracker, http restart, DB WAL) and the SQLite connection leak fix from #1118 are already in upstream and have been in every release since then. So this is not the same leak coming back.

While looking into it I found and fixed two places where memory could grow without limit in v1.6.x:

  1. QUIC inbounds (Hysteria, Hysteria2, TUIC): the per-inbound session registry kept one entry for every client address it had seen, and only cleaned them up when a user was changed. With port hopping or mobile clients reconnecting, every new source port added an entry. Idle entries are now cleaned up regularly.
  2. Traffic stats: if saving stats to the database kept failing, the unsaved traffic was retried every 10s and the backlog grew without a limit. It is now merged per resource and saved in batches.

These will be in the next release. To be sure they explain what you are seeing, could you share:

  • the exact version
  • which inbound types you use (especially Hysteria2/TUIC) and roughly how many users
  • whether the panel log shows Get stats failed lines
  • the output of ls /proc/$(pidof sui)/fd | wc -l and grep -E 'VmRSS|Threads' /proc/$(pidof sui)/status, once shortly after a restart and again a day later