Memory leak in QNAP/Synology NAS?

I could do with a little less of this, too:

04/20 08:51:18 Info: [cast] discovered Google Cast Group
04/20 08:51:18 Error: [cast/client] [Google-Cast-Group-b419c7e3b66a4353b6fd33eb5533e50c._googlecast._tcp.local] Failed connect to 192.168.50.75 port 32232
04/20 08:51:19 Info: [stats] 24695mb Virtual, 5029mb Physical, 6253mb Managed, 371 Handles, 80 Threads
04/20 08:51:20 Info: [cast] lost device Google Cast Group because it disconnected
04/20 08:51:28 Debug: [easyhttp] [1583] POST to https://device-map.roonlabs.net/1/register returned after 203 ms, status code: 200
04/20 08:51:28 Trace: [devicemap] device map updated
04/20 08:51:34 Info: [stats] 24695mb Virtual, 5021mb Physical, 6257mb Managed, 371 Handles, 77 Threads
04/20 08:51:48 Info: [cast] discovered Google Cast Group
04/20 08:51:48 Error: [cast/client] [Google-Cast-Group-b419c7e3b66a4353b6fd33eb5533e50c._googlecast._tcp.local] Failed connect to 192.168.50.75 port 32232
04/20 08:51:49 Info: [stats] 24655mb Virtual, 5029mb Physical, 6264mb Managed, 371 Handles, 75 Threads
04/20 08:51:50 Info: [cast] lost device Google Cast Group because it disconnected
04/20 08:51:58 Debug: [easyhttp] [1584] POST to https://device-map.roonlabs.net/1/register returned after 245 ms, status code: 200
04/20 08:51:58 Trace: [devicemap] device map updated
04/20 08:52:04 Info: [stats] 24663mb Virtual, 5030mb Physical, 6275mb Managed, 371 Handles, 74 Threads
04/20 08:52:18 Info: [cast] discovered Google Cast Group
04/20 08:52:18 Error: [cast/client] [Google-Cast-Group-b419c7e3b66a4353b6fd33eb5533e50c._googlecast._tcp.local] Failed connect to 192.168.50.75 port 32232
04/20 08:52:19 Info: [stats] 24671mb Virtual, 5038mb Physical, 6255mb Managed, 371 Handles, 77 Threads
04/20 08:52:20 Info: [cast] lost device Google Cast Group because it disconnected
04/20 08:52:28 Debug: [easyhttp] [1585] POST to https://device-map.roonlabs.net/1/register returned after 210 ms, status code: 200
04/20 08:52:28 Trace: [devicemap] device map updated
04/20 08:52:32 Info: [cast] discovered Google Cast Group
04/20 08:52:32 Error: [cast/client] [Google-Cast-Group-b419c7e3b66a4353b6fd33eb5533e50c._googlecast._tcp.local] Failed connect to 192.168.50.75 port 32232
04/20 08:52:34 Info: [stats] 24679mb Virtual, 5038mb Physical, 6247mb Managed, 371 Handles, 78 Threads
04/20 08:52:34 Info: [cast] lost device Google Cast Group because it disconnected
04/20 08:52:42 Debug: [easyhttp] [1586] POST to https://device-map.roonlabs.net/1/register returned after 213 ms, status code: 200
04/20 08:52:42 Trace: [devicemap] device map updated
04/20 08:52:48 Info: [cast] discovered Google Cast Group
04/20 08:52:48 Error: [cast/client] [Google-Cast-Group-b419c7e3b66a4353b6fd33eb5533e50c._googlecast._tcp.local] Failed connect to 192.168.50.75 port 32232
04/20 08:52:49 Info: [stats] 24687mb Virtual, 5020mb Physical, 6254mb Managed, 371 Handles, 79 Threads
04/20 08:52:50 Info: [cast] lost device Google Cast Group because it disconnected
04/20 08:52:58 Debug: [easyhttp] [1587] POST to https://device-map.roonlabs.net/1/register returned after 201 ms, status code: 200
04/20 08:52:58 Trace: [devicemap] device map updated
04/20 08:53:04 Info: [stats] 24687mb Virtual, 5021mb Physical, 6266mb Managed, 371 Handles, 77 Threads
04/20 08:53:18 Info: [cast] discovered Google Cast Group
04/20 08:53:18 Error: [cast/client] [Google-Cast-Group-b419c7e3b66a4353b6fd33eb5533e50c._googlecast._tcp.local] Failed connect to 192.168.50.75 port 32232
04/20 08:53:19 Info: [stats] 24679mb Virtual, 5016mb Physical, 6270mb Managed, 371 Handles, 78 Threads
04/20 08:53:20 Info: [cast] lost device Google Cast Group because it disconnected
04/20 08:53:28 Debug: [easyhttp] [1588] POST to https://device-map.roonlabs.net/1/register returned after 209 ms, status code: 200
04/20 08:53:28 Trace: [devicemap] device map updated
04/20 08:53:34 Info: [stats] 24679mb Virtual, 5017mb Physical, 6274mb Managed, 371 Handles, 74 Threads
04/20 08:53:48 Info: [cast] discovered Google Cast Group
04/20 08:53:48 Error: [cast/client] [Google-Cast-Group-b419c7e3b66a4353b6fd33eb5533e50c._googlecast._tcp.local] Failed connect to 192.168.50.75 port 32232
04/20 08:53:49 Info: [stats] 24671mb Virtual, 5033mb Physical, 6246mb Managed, 371 Handles, 77 Threads
04/20 08:53:50 Info: [cast] lost device Google Cast Group because it disconnected
04/20 08:53:58 Debug: [easyhttp] [1589] POST to https://device-map.roonlabs.net/1/register returned after 951 ms, status code: 200
04/20 08:53:58 Trace: [devicemap] device map updated
04/20 08:54:04 Info: [stats] 24671mb Virtual, 5014mb Physical, 6261mb Managed, 371 Handles, 75 Threads
04/20 08:54:14 Info: [cast] discovered Google Cast Group
04/20 08:54:14 Error: [cast/client] [Google-Cast-Group-b419c7e3b66a4353b6fd33eb5533e50c._googlecast._tcp.local] Failed connect to 192.168.50.75 port 32232
04/20 08:54:16 Info: [cast] lost device Google Cast Group because it disconnected
04/20 08:54:16 Info: [cast] discovered Google Cast Group
04/20 08:54:16 Error: [cast/client] [Google-Cast-Group-b419c7e3b66a4353b6fd33eb5533e50c._googlecast._tcp.local] Failed connect to 192.168.50.75 port 32232
04/20 08:54:19 Info: [cast] lost device Google Cast Group because it disconnected
04/20 08:54:19 Info: [stats] 24671mb Virtual, 5029mb Physical, 6331mb Managed, 371 Handles, 77 Threads
04/20 08:54:26 Debug: [easyhttp] [1590] POST to https://device-map.roonlabs.net/1/register returned after 207 ms, status code: 200
04/20 08:54:26 Trace: [devicemap] device map updated
04/20 08:54:34 Info: [stats] 24671mb Virtual, 4997mb Physical, 6354mb Managed, 371 Handles, 74 Threads
04/20 08:54:48 Info: [cast] discovered Google Cast Group
04/20 08:54:48 Error: [cast/client] [Google-Cast-Group-b419c7e3b66a4353b6fd33eb5533e50c._googlecast._tcp.local] Failed connect to 192.168.50.75 port 32232
04/20 08:54:48 Trace: [library] endmutation in 49ms
04/20 08:54:49 Info: [stats] 24671mb Virtual, 4999mb Physical, 6352mb Managed, 371 Handles, 77 Threads
04/20 08:54:50 Info: [cast] lost device Google Cast Group because it disconnected
04/20 08:54:58 Debug: [easyhttp] [1591] POST to https://device-map.roonlabs.net/1/register returned after 233 ms, status code: 200
04/20 08:54:58 Trace: [devicemap] device map updated
04/20 08:55:04 Info: [stats] 24695mb Virtual, 5000mb Physical, 6363mb Managed, 371 Handles, 76 Threads
04/20 08:55:18 Info: [cast] discovered Google Cast Group
04/20 08:55:18 Error: [cast/client] [Google-Cast-Group-b419c7e3b66a4353b6fd33eb5533e50c._googlecast._tcp.local] Failed connect to 192.168.50.75 port 32232
04/20 08:55:19 Info: [stats] 24663mb Virtual, 4996mb Physical, 6364mb Managed, 371 Handles, 76 Threads
04/20 08:55:20 Info: [cast] lost device Google Cast Group because it disconnected
04/20 08:55:28 Debug: [easyhttp] [1592] POST to https://device-map.roonlabs.net/1/register returned after 213 ms, status code: 200
04/20 08:55:28 Trace: [devicemap] device map updated
04/20 08:55:34 Info: [stats] 24663mb Virtual, 4970mb Physical, 6368mb Managed, 371 Handles, 73 Threads
04/20 08:55:48 Info: [cast] discovered Google Cast Group
04/20 08:55:48 Error: [cast/client] [Google-Cast-Group-b419c7e3b66a4353b6fd33eb5533e50c._googlecast._tcp.local] Failed connect to 192.168.50.75 port 32232
04/20 08:55:49 Info: [stats] 24695mb Virtual, 4983mb Physical, 6351mb Managed, 371 Handles, 80 Threads
04/20 08:55:50 Info: [cast] lost device Google Cast Group because it disconnected
04/20 08:55:56 Trace: [broker/accounts] [heartbeat] now=4/20/2022 3:55:56 PM nextauthrefresh=4/20/2022 4:20:59 PM nextmachineallocate=4/20/2022 6:20:56 PM
04/20 08:55:56 Info: [cast] discovered Google Cast Group
04/20 08:55:56 Error: [cast/client] [Google-Cast-Group-b419c7e3b66a4353b6fd33eb5533e50c._googlecast._tcp.local] Failed connect to 192.168.50.75 port 32232
04/20 08:55:58 Info: [cast] lost device Google Cast Group because it disconnected
04/20 08:56:04 Info: [stats] 24695mb Virtual, 4987mb Physical, 6411mb Managed, 371 Handles, 79 Threads

1 Like

Looks like the DS killed the rogue service and restarted it. Now down to a quiet 1 GB of RAM usage.

RAM usage for RoonAppliance process has now been around 2,3-2,6GB. I have no idea what took it to over 5GB the other day. I hope it won’t to there again.

I gave wrong specs for my library earlier, it’s 1,59TB in size with 3833 albums.

I have the exact same issue nowadays. Started with one of the recent updates. I have 32GB but after 1-2 days the memory usage of Roon reaches 29GB of the 32GB I have on the QNAP so swap space is used and in the end the whole QNAP server is almost unreachable/slow. Roon is installed through the App center. Something definitely changed as I ran it for almost 2 years without a glitch. There is definitely a memory leak of some sort.

Does it get fixed with latest 936 build?

Can you please edit the title of this thread. The term ‘last update’ gets old pretty quickly these days and it will make searches much more useful for others having similar issues. :grinning:

2 Likes

To show what’s happening attached also how memory usage suddenly increases this early morning when I was asleep. Around 8:45 I stopped Roon and memory usage went back to normal. I also see that Roon itself took around 30GB memory. No other process has this problem on the NAS.


I hope someone from Roon can help out here because this makes Roon not really usable. @Mike.

1 Like

I also have this problem on a 920+, been running fine for a couple of years now and this latest update has a serious leak that results in Ram usage over 95% and brings everything to a crippling halt.

Stopping and starting roon solves the problem for about 4 hours or so of play and it then happens again.

This is roon that’s the issue, not the NAS

1 Like

Yes, confirm this as well with the latest version running on a Intel NUC (Linux).

1 Like

Well, I was getting so frustrated by not being able to use Roon because of this memory leak issue that I looked whether there was a docker image available through Container Station and there is. Just installed it with setting a limit of 8GB for the docker image and till now no memory issue at all. Must say the migration went easy: just put a backup back in the image and after that change the Paths to my music collection and backup location in Roon as the paths are different in the docker. Maybe a good tip for other people having the same frustration.

I’ve also set a reboot script for 4am each morning so when I use it in the day I’m getting about 3-4 hours out of it each day before I switch to vinyl. Hopefully a fix is incoming

Yes, good point, done.

THIS.

This is what I think I am seeing. Even with no load, my RoonAppliance hovers at 30-40% of the CPU. It’s doing this.

I’ve brought it up on here before but the suggestion was that my CAs and Cast Groups were disconnecting and reconnecting. They are not. (I have logs on my in-house connections - the CAs don’t connect/disconnect/connect. They are pretty solid.

I’m guessing there is something wrong in the RoonAppliance endpoint that keeps the service doing device discovery on cast devices.

I’ve managed to get the load down on the CPU by turning off memory compression in my NAS, I’ve also noticed desktop remote app seems to hit it much harder, particularly if you leave it open…so for now I’m using it, q’ing a bunch of stuff and then closing it. I’m roughly able to get a full day out of it and the reboot at night is resetting things ready for next day.

hopefully a fix comes soon cos it’s a real pain to have to use the remote so sparingly.

2 Likes

Read also:

2 Likes

Here’s the thing about memory compression - it’s not likely to cause a problem. It’s a sound and mature technology that comes from the Linux zram kernel module. It has very little CPU performance overhead, and can have a tremendous positive impact on disk performance. Here’s the key thing: It only compresses data that isn’t being used very often! By definition, it’s not going to do much with the stuff everybody on these pages is concerned about. I see people doing this all the time with Synology devices, achieving a placebo effect for folks. That’s why it is on by default.

Ive been reading about this for a while and noticed its impacting me also. The roon process was using 10GB ram on my nas and after reboot and a day later its sub 2GB.

Absolutely BlackJack! I just unchecked my Synology 918+ memory compression about 6 hours before bumping into your post here and sure enough, it is maintaining well without the prior issues of “Waiting for Roon Core…” with a memory utilization of 90% (which is crazy). I had been having this issue for about a week now (seemingly after some Roon updates) and it was driving me nuts. To add insult to injury, I’ve got 2 SSD NVME 1GB drives and 16GB of RAM and had never had this problem before. It’s looking like that is the solution. Fingers crossed!

UPDATE: Spoke too soon. Memory consumption has been rapidly growing since this post and is not at 10.1GB (67%) and climbing again without anything playing. Unfortunately the unchecking on the memory compression didn’t do the trick as I hoped. The strange thing is that I’ve been using Roon the same way with the same equipment for almost a year now without issue and seemingly after the recent updates in May 2022, the memory problem started. The quest for a solution continues.

1 Like

I have 8GB of RAM in my 918+ and don’t have any performance issues with a 2TB library. One thing to keep in mind is that the 918+ is not spec’d to work with more than 8GB of RAM, even though people have discovered that it seems to work. But that overextension might actually be part of the problems you are/were seeing.

1 Like

Interesting. I never knew that since the 918+ allowed me to put in the 16GB of RAM and never really had an issue before. Then again, maybe it was never “pushed” like Roon is pushing it now. I do see that you are correct in that it is only spec’d for 8GB of RAM. I’m going to try to downgrade it to 4GB to see if I noticed a performance improvement or change as opposed to having the 16GB in there. Thanks DDPS.