Unity allocates RAM indefinitely until freezing the computer when opening an empty project

I’m having an issue for weeks now.
I’m on Windows 10, using Unity 2021.3.10f1.

Basically, I was able to work normally on my project for a while, then, at some point, I open my project and the editor eats all the RAM (which right now is 24GB of free RAM), until the computer freezes and I have to reboot it.
When I open the profiler, I see that it is “Untracked Memory” which is growing rapidly (around 20MB per second, with spikes even faster than that).
8465795--1124489--Unity_2022-09-26_10-08-59.png

Then, everytime I open this project, it’s the same, and I can’t work anymore.
Note that I also can’t close Unity normally, as it stalls, while still consuming RAM at an alarming rate. I always need to kill the process.

More bizarre, I can’t open a new project anymore, it stalls during the loading bar, while using all the RAM.
Last time I tried, it was stuck at importing the com.unity.purchasing/Runtime/Stores/Android/GooglePlay/AAR/Models/GoogleBillingResult.cs file.

I tried uninstalling Unity, removed all Unity folders I could find in Program Files & AppData, removed the Registry entries. It worked for a few days like this, until the bug mysteriously reappered.

I’m getting really tired of this, I’ve been reinstalling Unity at least 10 times, different versions, but to no avail. The bug always comes back at some point. I simply can’t work on my project.

does editor.log have any extra info?

Oh my, it said this:

EditorUpdateCheck: Failed Could not resolve host: updatecheck.unity3d.com
[Package Manager] Package [com.unity.memoryprofiler] cannot be found
Curl error 6: Could not resolve host: cdp.cloud.unity3d.com
Created GICache directory at C:/Users/myname/AppData/LocalLow/Unity/Caches/GiCache. Took: 0.038s, timestamps: [19.428 - 19.466]
gi::BakeBackendSwitch: switching bake backend from 3 to 1.
Setting up 2 worker threads for Enlighten.
[Licensing::Module] Successfully updated access token: "0G2p3x_z"... (expires: 2023-09-26 09:04:48 GMT)
Curl error 6: Could not resolve host: api.unity.com
Project ID request failed, Reason: The requested URL returned error: 404 (404).
Unknown Unity Connect error (400). Please contact support at support@unity.com while processing request "https://core.hub-proxy.unity3d.com/api/projects/61320f9f-2da2-4c4a-9dbf-2883337183e7", HTTP error code 404
.Curl error 6: Could not resolve host: cdp.cloud.unity3d.com
TrimDiskCacheJob: Current cache size 0mb
Curl error 6: Could not resolve host: cdp.cloud.unity3d.com
Curl error 6: Could not resolve host: cdp.cloud.unity3d.com
[LAYOUT] About to save layout C:\Work\myproject\UserSettings\Layouts\default-2021.dwlt

And I’m currently using a Cisco VPN for work… Disabling it fixed everything!
So I guess it’s when my VPN is active, some websites are not reachable, and then Unity is confused and eats RAM like crazy.

My issue seems to be fixed then, but there’s probably a huge memory leak in Unity’s Editor code when some sites can’t be reached.

if you can, report as a bug also

Dont know if anyone still has this Problem but for me it seems to happen when I am connected to a VPN, in my case Mullvad VPN. If active Unity keeps loading the RAM until the computer crashes.

Turning off the VPN and restarting Unity Hub and Unity worked for me to fix this. Quite annoying though

I am using Mullvad VPN, Split Tunneling didn’t work out (even with excluding Unity.Licensing) but disconnecting the project from Unity Cloud somehow worked for me.

If someone is still trying to work while using a VPN, you can try this.

This is still happening in Unity 2022.3.62f3 LTS.
It doesn’t reproduce in Unity 6.3 LTS (which is great).

Symptoms / env:

  • Win 11
  • have 2 VPN services running in background (services only, VPN apps are not running, and VPNs are off)
    • AmneziaVPN-service (VPN-service.exe)
    • Adguard VPN Service (AdGuardVpnSvc.exe)

When opening an empty project in 2022.3 (not connected to the Unity Cloud), I see RAM usage skyrockets up to the hw limit in 10 mins (I have 64 gb).

I’ve tried using Windows Performance Analyzer following this guide from @Tautvydas-Zilys (thread) and got such result: multiple allocations coming from ws2_32.dll!socket:

Export from WPA

83,[Root]/ntdll.dll!RtlUserThreadStart/kernel32.dll!BaseThreadInitThunk/Unity.exe!?/Unity.exe!?/Unity.exe!?/Unity.exe!?/ws2_32.dll!socket/ws2_32.dll!WSASocketW/mswsock.dll!WSPSocket/mswsock.dll!SockSocket/ntdll.dll!RtlAllocateHeap/ntdll.dll!RtlpAllocateNTHeapInternal/ntdll.dll!RtlpLowFragHeapAllocFromContext/ntdll.dll!RtlAllocateHeap/ntdll.dll!RtlpAllocateNTHeapInternal/ntdll.dll!RtlpAllocateHeap/ntdll.dll!RtlpExtendHeap/ntdll.dll!RtlpFindAndCommitPages/ntdll.dll!NtAllocateVirtualMemory/ntoskrnl.exe!KiSystemServiceCopyEnd/ntoskrnl.exe!NtAllocateVirtualMemory/ntoskrnl.exe!MiAllocateVirtualMemory/ntoskrnl.exe!PerfInfoLogVirtualAlloc/System\ETW Overhead,[Root]/ntdll.dll!RtlUserThreadStart/kernel32.dll!BaseThreadInitThunk/Unity.exe!/Unity.exe!/Unity.exe!/Unity.exe!/ws2_32.dll!socket/ws2_32.dll!WSASocketW/mswsock.dll!WSPSocket/mswsock.dll!SockSocket/ntdll.dll!RtlAllocateHeap/ntdll.dll!RtlpAllocateNTHeapInternal/ntdll.dll!RtlpLowFragHeapAllocFromContext/ntdll.dll!RtlAllocateHeap/ntdll.dll!RtlpAllocateNTHeapInternal/ntdll.dll!RtlpAllocateHeap/ntdll.dll!RtlpExtendHeap/ntdll.dll!RtlpFindAndCommitPages/ntdll.dll!NtAllocateVirtualMemory/ntoskrnl.exe!KiSystemServiceCopyEnd/ntoskrnl.exe!NtAllocateVirtualMemory/ntoskrnl.exe!MiAllocateVirtualMemory/ntoskrnl.exe!PerfInfoLogVirtualAlloc/ntoskrnl.exe!EtwTraceSiloKernelEvent/ntoskrnl.exe!EtwpLogKernelEvent/ntoskrnl.exe!EtwpTraceStackWalk,“233,256876300”,“251,513289200”,0x000001B90F19B000,1,“0,000”,“0,262”

Can share the full WPR dump as well.

Full PC restart doesn’t help.
In Memory Analyzer, I see diff in the untracked private mem only (can drop the snaps from the memory profiler cc @MartinTilo)

Workaround:

  • restart both VPN services or stop them entirely

Should I file a bug report guys or it’s fine to keep it here?

Hey, looks like the relevant frames coming from Unity are missing symbols. Can you direct Windows Performance Analyzer to also load symbols from http://symbolserver.unity3d.com/?

I am also happy to look at the full trace if you DM it to me. A bug report would also be very helpful as issues tend to get lost on discussions as they’re not tracked properly.

Bump, faced the same problem on Win11 and Win10, the problem is still exists

Workaround: terminate all vpn services, open unity and wait unitil Editor open, start vpn services

Still having the same issue in 2026 with Mullvad VPN. Split tunneling does not work. It also seems to break the virtual network adapter of the VPN, causing you to get “host not found” errors. Ridiculous.

I don’t think there was ever a bug filed for this so please do report a bug if you have a repro for this.