Music Assistant memory usage

I’ve had music assistant installed for awhile and keep it up to date. I’ve been suspecting a memory leak for some time, but after seeing the memory drop after a restart (and update), I thought I would ask around. Looking at the last week of data, it doesn’t act like a leak…just high usage. I have a large collection(20K+ files). Is it just an artifact of that?


This is a 1 week time period. It seems to be between 3.8 and 4.7 during that period, with the amount going down towards the end of that period.

While I have it installed and indexing, I really haven’t been using it. I have my own song queue manager, but am following along with music assistant in hopes that one day I won’t have to manage my own custom code.

I haven’t monitored everything as meticulous as you but I can tell my Music Assistant had a big leak as it seems right now. My journey so far:
My system started to freeze up once in a while after I installed MA. I scheduled an automatic reboot to free up memory because I couldn’t find the problem. That kept it in check for a while. Untill the usb of the Pi stopped working so I had to replace it the Pi. It’s a Pi 4 with a powered USB hub for my SSD and Zigbee dongle.
It didn’t feel right so I uninstalled MA and my memory is stable again. Here’s my memory usage before and after the uninstall (12 o clock)

1 Like

The leak comes and goes. I suspect it is related to indexing cycles, but I don’t have a lot of evidence. I may just restart the docker container on a regular basis.

My HASS server crashed very early this moring. This is the first time ever and I’ve been running it for years.

I have identifed that MA is the culprit - I could watch the system memory be consumed and the memory percentage MA reported was increasing every time I refreshed the screen. This was without any active use of MA.

I run HAOS on an Intel i5/9500 with 16GB and was surprised by how quickly MA was increasing the memory demand. Sometimes it was 1 - 2% of total system memory each time I refreshed the screen!

I removed 2.6.3 and reinstalled 2.6.2 but the same trend continued. I re-installed 2.6.3 and it continued.


The chart above shows the continued memory consumption - and the MA restarts from my attempts to identify the problem and stop HASS crashing again. Sadly, nothing has worked and I’ll have to stop MA until I can find a solution.

If anyone has any suggestions, I’d really appreciate them. Thanks

I now understand that there is a known memory leak in the Squeezelite player on 2.6.x. I have been running 2.7.0b15 (beta) for about 24 hours and the memory usage has remained static.

I’ll stay with this version until the release 2.7.x version is available.