ch1ller0 / fridgefm-radio-core

Simple lightweight package for creating your own radio station via NodeJS heavily inspired by Shoutcast and Icecast.
https://fridgefm.com
MIT License
47 stars 9 forks source link

Question regarding the memory usage #319

Closed JonaBecher closed 2 years ago

JonaBecher commented 2 years ago

Hello, first of all many thanks for the project. This is exactly what I am looking for and it works perfectly!

I was just wondering what the memory consumption looks like? Is it related to the number of songs in a playlist? My radio runs for about 24 hours and the memory consumption is steadily increasing (currently about 185MB). How does the consumption behave over time? Thanks in advance!

Best, Jona

ch1ller0 commented 2 years ago

@JonaBecher Hey! Thanks for your kind words, the memory consumption should work like this - each time a track changes the next track is uploaded to RAM and the previous one is deleted from it and the associated stream is also removed. My server https://fridgefm.com also runs for a very long time but does not have a memory-leak (at least a significant one). I would recommend you to debug your app using common nodejs profiling tools for searching the leak if there is one. Answering the question - memory consumtion is not related to the number of tracks in the list. Maybe you could send the code snippet?

JonaBecher commented 2 years ago

Hey @ch1ller0, thanks a lot for the explanation. I restarted my server and the continuous increase in RAM no longer occurred. Strange, but now everything is running the way you described. Thanks!