codeskyblue / gohttpserver

The best HTTP Static File Server, write with golang+vue
MIT License
2.45k stars 516 forks source link

上传大文件发生内存泄漏 #187

Open Live4dreamCH opened 7 months ago

Live4dreamCH commented 7 months ago

用例: windows开server,命令为:

.\gohttpserver.exe --upload

安卓机在局域网内,访问网页上传

问题: 每次开始上传大文件(800MB或2GB),进程占用内存就增加几十MB。 上传完成或取消后内存占用不降低。 多次上传后,内存占用可不断累加(目前最大值227.7MB),有可能导致崩溃

屏幕截图 2023-11-12 001705
Live4dreamCH commented 7 months ago

update:静置几分钟后内存占用会降低至正常水平,可能与这行日志有关

2023/11/12 00:23:54 httpstaticserver.go:90: Started making search index 2023/11/12 00:23:54 httpstaticserver.go:92: Completed search index in 0s

image