Excessive Memory Usage and Performance Slowdown in Roon Server (ref#0BVMRS)

Oh, and it looks like RoonAppliance has just restarted again.
The client UI locked up (jellyfish on home screen) and then came back. At same time on server I see memory use creeping up from zero. Checking again after it settles down I see that the RoonApplicance process has now only been running for 2 minutes.
I have no idea what caused that. It was just playing a playlist from Home screen… and then it suddenly wasn’t.

There has been one more restart since then. I don’t know why but it may have just been a priority Windows update (my main Windows server did issue an alert about that). And now the Roon client on this desktop PC is telling me that an update is awaiting relaunch on both this PC and on the server (update to build 1444 earlyaccess).
So unfortunately at the moment it is proving hard to let anything run for long enough to see how it looks.
I’ll relaunch both client and server for the updates now. Maybe tomorrow will go better.

1 Like

Hey @Andrew_Beveridge,

We appreciate the response and follow-ups! Definitely let us know how things run on the latest early access release. :+1:

Between 2pm and 10pm today, with nothing playing and no UI activity on any client, the memory usage of RoonAppliance went from 800MB to 2.5GB

And a constant 5 to 12% CPU churn.

This is with my podcasts folder disabled and those analysis settings disabled.

Qobuz streaming is still enabled although not being actively used at the moment.

Oh, and as I have been typing this the memory footprint has dropped from over 2.5GB to 1.85GB although it is looking fairly steady at the moment. CPU is still around 5% to 8% for no obvious reason.
No UI clients open, no zones playing.
Oh, CPU just shot up to over 40% for no obvious reason.

For now I will leave it running to see how it looks in the morning.
I will try again tomorrow after a restart with Qobuz disabled also.

This morning memory footprint had fallen back to just over 1GB, where it has stayed as far as I can tell.

For the last few days it has seemed steady at around 1GB memory use.

This morning that has shot up to 2.4GB again and is holding there.

I have no idea what caused this. Nothing playing last nigh when this happened. Nothing has been added to my library. Podcasts folder is still disabled. Analysis is still turned off.

And it has been creeping up since.

I have watched it creep steadily up from 2.2GB up to 2.9GB over the last 2 hours of playing a handful or albums, mainly from Qobuz (linked from the Roon main home page) over the last few hours.

It is also getting noticeably slower to respond… I’m seeing the jellyfish a lot more.

I will leave it undisturbed for a day or so longer, if I can stand it, just to see how bad it gets.

OK, I just noticed that memory use immediately and suddenly jumped back to 800MB again. It looks as if it had crashed and restarted? There could of course be other reasons for that… I don’t really know enough about how RoonAppliance handles memory to comment.

Anyway, I went to poke about in Windows Event Viewer to see if there are any recent event records that might reveal something useful about what happened, AND…

I see there have been quite a few errors logged against RoonAppliance.exe (as far back as June 2023), and before that against RoonServer.exe right back to 12th May 2023, and then no records before that. Hmmm, I moved house back in May 2023 so that could be a fresh installation then… hard to remember for sure.

Anyway, the errors are ALL the same. Exception code 0xC00000FD.
That would be a stack overflow exception!
Sometimes there were several a day. Other times none for several days.
Might Roon Server have some nasty recursion? or an expected exception that just fails to tidy up after itself?

Always happens in RoonAppliance.exe lately. Never in any other apps (not that I have much else installed on this server).
Usually faulting in module in mswsock.dll but sometimes module unknown, sometimes coreclr.dll, and occasionally in ntdll.dll

I should add, there were NOT any such stack overflows during the several hours today when I have seen memory use go from 1GB to 2.9GB and then suddenly back to 800MB. Surely that is not normal expected behaviour though?

Whilst i am poking about I am going to do a library clean-up. I notice that I have 2121 deleted files and 677 files that are associated with disabled Storage locations (presumably my podcasts folder that I disabled). I don’t see why they would harm things but who knows.

And just now RoonAppliance.exe disappeared from running task list.
Then it automatically restarted… I just watched it’s memory footprint grow from zero all the way to it’s present 1.2GB in about 2 minutes.

Oh, and there is a corresponding 0xC00000FD Stack Overflow in RoonAppliance.exe logged at 17:07
Faulting module mswsock.dll version 10.0.19041

All I did to cause this is run a Roon search for an artist.
:frowning:

I’m going to disable Qobuz service now. I will leave Tidal enabled.
We’ll see how it does after that

OK, Qobuz has been disabled for a while now.
Checking Windows event logs since then I still see CLR stack overflows happening
Even TODAY… and I have not used Roon today so far at all.

23/08/2024 14:06
23/08/2024 13:51
22/08/2024 21:36
22/08/2024 17:37

This cannot be right? AFAIU C# hard stack overflows are not recoverable? ie. You can catch them but then all you can do is bail… your app is toast at that point. This is presumably the silent restarts that I see?
(literally silent - playback stops and Roon disappears for about 2 minutes).

My Roon client (not server) is now wanting to update to build 1448 so I will relaunch to let that happen.

For the record, I am leaving Qobuz disabled and analysis disabled and podcast folder disabled, and not allowing any updates to my library.

I am starting to think there could be something wrong with my server?
Apart from replacing it I wonder how best to check?

UPDATE: Woah, I think the CLR crashes are a red-herring. It looks like that may be a known Windows bug. And of course whilst I have been watching Roon Server footprint I have been occasionally moving the mouse on the server… and all it takes is to move the mouse over the taskbar.

I have now disabled that useless Windows feature. Starting again from where I was 3 days ago. Please ignore last few posts about stack overfows. Weird how the event handler was blaming RoonAppliance.exe for those though :-/

FURTHER UPDATE: No, it’s not that.
Keen to hear a podcast I have missed, I just re-enabled the podcasts folder in Roon Settings. My new files appeared in Roon, so I started episode 4 playing.

It played for about 30 seconds and then audio stopped and RoonAppliance.exe disappeared. not here in task manger either. Then several seconds later t clearly relaunches somehow and I see it re-appear and the memory footprint climbs back to to around 1.2GB

Checking Windows event logs I see yet another CLR Stack Overflow (exception 0xc00000fd) in mswsock.dll within RoonAppliance.exe at 23/08/2024 15:06:57

:frowning:

Does anyone else run Roon Server on Windows?

Sure, I’ve run it for 9 years

I run Roon Server on Nucleus, Dell XPS 15 laptop (Windows 11), and MacMini (late 2014). Never had any problems with any of them in 4 1/2 years. I am currently away from home for two weeks using my Dell with Verizon cellular data and Speedify.

Hi @Andrew_Beveridge

If you have another computer to test on you can create another Roon server on that computer, then deauthorize the original server, and then see if the problem persists on the new server. If it doesn’t you can then restore a backup and add in your library to see if the problem appears then. If the problem never reappears then it’s a pretty good bet that the original server is the problem.

I have lots of other computers that I COULD run it on. But they all have other purposes. I guess this is why people run VMs :-/

My Debian server can still dual-boot its original Windows 11 Pro. Perhaps I should try it as a fresh Windows Roon Server for a bit and see how things go?

OK, I got fed up with all the problems on my NUC.
After reading up on other recommendations and suggestions here I decided to install Roon Server on another Windows PC.

After much consideration, I have installed it on my main development PC. This is a fast 16 core AMD desktop with Windows 10 and 32GB or memory so a bit OTT but it was the easiest to try out.

My library remains on the same Synology NAS, on the same 16 port TP-Link network switch as the old NUC and this new PC.

After installing Roon earlyaccess here, and de-authorising same on the old i5-NUC I have noticed :-

  1. The i5 NUC has been completely stable since I stopped Roon Server on it. Not a single application error, and no memory issues from a soak test.

  2. RoonAppliance memory use on this new install on dev PC… immediately shot up to 1.5GB RAM use. ie. more than the typically 800MB I see when running the same database on the NUC. CPU use remained less than 1% no matter what I asked Roon to do.
    BUT over next 24 hours that memory footprint has steadily increased. It is now over 3.6 GB and CPU use by RoonApplicance.exe is skipping up to 5-10% now and then all by itself.
    This new install still has all analysis turned off and my podcasts storage disabled although I do still have Qobuz enabled. UI experience at clients is still reasonable (but system requirements to maintain that are definitely not).

I have to say that Roon’s 3.6GB memory load from my development PC is not good. This surely has to be a SEVERE memory leak. I see the constant churn, and your overheads from managing that like that are very likely going to be WAY higher than any benefits. Something is very wrong there.

However I have not yet seen any sign of the CLR hard stack overflows like I was seeing on the NUC. That seems odd. Apart from being huge amount faster the runtime environment here is pretty similar… both have 4MB default stack and that should be plenty.

1 Like

3 hours later and it is now up to 4GB (!)
I have not been playing any audio in the meantime. No Zones active.

My old server would have been struggling at this point but UI is still reasonably responsive on this server so I am going to leave it alone some more to see how far it goes.

Wow… and I just picked a Tidal “My Mix 4” playlist from the Tidal “WHAT’S NEW” tab and it shot up to 4.5GB !

Woah! And there it goes!

Even on this dev PC with 32GB RAM.
Whilst that same Tidal playlist was playing, I just changed track in the playlist, at 5 seconds into the new track audio just stopped and the Roon client could no longer see the server. RoonAppliance disappeared from Task manager and re-appeared about a minute later. Memory use then climbed slowly (over about 20 seconds) up to about 1.35 GB.

Checking the Windows event log I see a CLR hard stack overflow…

  • EventData

    RoonAppliance.exe
    1.0.0.0
    6696b8b9
    mswsock.dll
    10.0.19041.3636
    e4e6fdd9
    c00000fd
    0000000000010c19
    54a8
    01daf62800c821fa
    C:\Users\andy\AppData\Local\RoonServer\Application\RoonAppliance.exe
    C:\Windows\system32\mswsock.dll
    73efb429-649f-4c6b-89ac-402fc05fd9bc

And was fairly stable overnight at around 1.4GB.
But is now back up to well over 3GB again.
Nothing has been playing all morning.

I am happy to try a few more things to see if we can figure this out but as my main audio handling system this is really getting to be unworkable now :-/

What do we try next? More things on Windows? Or should I setup on a Linux server?