Profiling Server Memory Leaks

Hi everyone!

I have a simple Linux test server running on Unity’s Game Server Hosting, but I’ve noticed the Memory usage continues to increase ever so slightly every minute, even when Online/Allocated with no clients connected. It grows by an average of 0.125 MiB (~130 kb) a minute, so I’m worried there may be a memory leak somewhere. CPU usage, on the other hand, remains stable. This happens both on Multiplay-allocated servers and manually-started ones.

Has anyone else experienced DGSs behaving in this way? I’m wondering if there might be some overhead in Multiplay Services that could be causing this, although it’s also likely that the issue lies on my end and on my implementation. I am updating SQP via UpdateServerCheck on every fixed frame, after all.

I was hoping I could use Unity’s Profiler to remotely connect to the server and monitor it, but I’m not sure which IP and Port are needed for this. Do I use the port of the specific server instance (i.e 9000), or the 55000 that is normally used for this?

Alternatively I could build a Windows-based server to run locally and profile that one instead, assuming the issues persists there.

Just to give you some context, I’m currently using Unity 2022 LTS with Mirror for networking.

Thanks in advance!

P.S Not sure if this is the correct forum category to post this under, let me know If I should move it.

1 Like

Hi Marco,
My colleague Alexey answered the part about how to deal with the Multiplay server ports for profiling over in this thread .

But yes, your alternative with a local build might also work if it persists.

1 Like

Hi, Did you find solution for this? , i am facing same issue with my dedicated linux server build, when i make build in unity editor 2020.3.22f1 my occupied ram memory remains stable about 100mb, But when I make build for same code for unity 2022.3.12 or any latest version in this series my occupied ram keeps on increasing eventually occupying all ram which results in crash.