Closed TookeX closed 1 week ago
Thanks for opening your first issue here! Be sure to follow the issue template!
问题出现在Alist v3
驱动,用的 https://github.com/go-resty/resty 这个库实现的上传
一番debug后定位到go-resty/resty/middleware.go#L490
go-resty/resty这个库为了支持重试会缓存io.Reader类型,执行go-resty/resty/middleware.go#L490之后内存就会暴增
想了2种解决方法
我试了第1个方法,内存不会暴增 @xhofe 有更好的解决方法吗?
Please make sure of the following things
[x] I have read the documentation. 我已经阅读了文档。
[x] I'm sure there are no duplicate issues or discussions. 我确定没有重复的issue或讨论。
[x] I'm sure it's due to
AList
and not something else(such as Network ,Dependencies
orOperational
). 我确定是AList
的问题,而不是其他原因(例如网络,依赖
或操作
)。[x] I'm sure this issue is not fixed in the latest version. 我确定这个问题在最新版本中没有被修复。
AList Version / AList 版本
v3.35.0
Driver used / 使用的存储驱动
Local & Alist v3
Describe the bug / 问题描述
同局域网下多个不同类型的设备部署了Alist,当尝试从local copy一些大文件去到远端的alist v3的时候,会观察到alist内存占用暴增,甚至超过正在拷贝的文件大小的增幅。在一些内存较小的设备上会导致进程crash,进而copy失败。为提issue在台式机上windows平台的alist做演示,目标端为android的alist_flutter。同时验证过crash会出现在以android的alist和docker的alist等内存较小的设备上作为源端向远端alist v3的storage copy时会crash。
Reproduction / 复现链接
https://alist.nn.ci/zh/guide/api/fs.html#post-%E5%A4%8D%E5%88%B6%E6%96%87%E4%BB%B6
Config / 配置
Logs / 日志