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

Slow memory leak with streamlink and Twitch #5889

Closed
bennyhillthebest opened this issue Jun 5, 2018 · 4 comments
Closed

Slow memory leak with streamlink and Twitch #5889

bennyhillthebest opened this issue Jun 5, 2018 · 4 comments

Comments

@bennyhillthebest
Copy link

mpv version and platform: 1:0.28.2-2 with Manjaro 17.1.10

Reproduction steps: "streamlink -p mpv twitch.tv/*** ###p"

Expected behavior: RAM usage by mpv stays constant in time

Actual behavior: mpv process slowly eats more and more RAM

Log file https://0x0.st/s_u3.txt

The log file talks about a "slow/stuck network connection" but on this occasion i made sure that the stream would not freeze or stop because of low cache, so i'm not sure what is the reason of this warning.

@CounterPillow
Copy link
Contributor

are you sure this isn't just the backwards cache filling?

@bennyhillthebest
Copy link
Author

On this instance the mpv RAM usage went from 100 megabytes to 280 megabytes, but i saw it other times going even to 600 megabytes. To me it looks exactly like a memory leak.

@j605
Copy link
Contributor

j605 commented Jun 6, 2018

Like @CounterPillow said, it is possibly just cache settings. Try with the mpv-git which has smaller cache defaults.

Look at demuxer-max-back-bytes and demuxer-max-bytes if you want to try it out yourself.

@bennyhillthebest
Copy link
Author

You're right, with demuxer-max-back-bytes and demuxer-max-bytes the RAM usage at some point becomes constant.

But i tried as a value for the two options 10 megabytes at 360p (which should be good considering that the incoming cache uses at maximum 1-2 megabytes at 360p) and the final RAM usage was still 270 megabytes.

Limiting (and by a lot) the cache definitely helped, but in the end not that much. I'm kinda disappointed with this behaviour, because on local files mpv is great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants