alexta69 / metube

Self-hosted YouTube downloader (web UI for youtube-dl / yt-dlp)
GNU Affero General Public License v3.0
6.31k stars 398 forks source link

Memory leak when downloading many videos. #297

Closed arabcoders closed 1 year ago

arabcoders commented 1 year ago

Hello,

I use this excellent tool to archive youtube channels, and it's works perfectly for my use case. Sadly, i think i managed to break something within the browser side, however the tool itself in the container doesn't crash.

image

it keep going up and up until chrome's crashes the tab

image

However checking the container stats does not seems to be leaking internally, which lead me to believe it's something to do with the frontend side.

image

at the time of writing this issue, there was around 200ish video queued to be downloaded.

PikuZheng commented 1 year ago

I noticed memory growth while downloading videos. But when I switch the tab to background, chrome reclaims the memory. Why not just close the tab after adding the video download queue?

PikuZheng commented 1 year ago

I think this is a problem when angular handles websocket (downloading progress bar)

arabcoders commented 1 year ago

I noticed memory growth while downloading videos. But when I switch the tab to background, chrome reclaims the memory. Why not just close the tab after adding the video download queue?

In my case, it reclaim the memory by killing the tab, i don't think closing the web UI is a solution for this problem, i personally like checking the status of all downloads. i do believe it has something to do with the progress bar, also what bothers me is i cant even run the memory debugger as it's crashes as well

PikuZheng commented 1 year ago

You are correct. . . I use mobile notifications to let me know when a download succeeds or fails. Dev tools - javascript vm instance memory doesn't seem to grow, it doesn't seem to work.