A Memory Leak Fix!

Is it a memory leak? Hmm or just a pc system setting mismatch?

Last night I found a Reddit post on the current and long reported ‘memory leak’ problem in Diablo 4 & as a new player I experienced my first of many virtual memory errors that required a restart.
First off, this is not a fix discovered by myself & I forget the Reddit posters name so I am very sorry for not adding any accolades to that person but, I did want to share this fix that helped me and many others!

The problem seems to be a setting in players ‘Advanced System Settings’ in relation to allocated file sizes.
Follow these steps & you should have No more random virtual memory errors.
This is what was posted but, you want to make a change than Apply the changes, you will than be prompted to do a pc restart.

Original:
Advanced System Settings > Advanced Tab > Performance Tab > Advanced Tab > Change > Select drive D4 is installed on > Click System Managed Size > Click Set & Ok all the way out.

Instead please follow this (subtle but important changes):
Advanced System Settings > Advanced Tab > Performance Settings > Advanced Tab > Change > *Click Custom Size- Initial (MB) & Maximum Size (MB): fill in both spaces with the Max MB of your Memory Ram ie. I currently have 32gb of Ram so I inputed: 32000 into both fields!!
If you have 16gb Ram = 16000 / 64gb Ram = 64000 etc…
Click Set > Click Ok > Click Apply > Click Ok.
You will be prompted to Restart your PC.

  • I would double check that your changes were saved by following the above back to the Performance Settings/Advanced page, bottom of the page will show your:
  • Virtual Memory: Total paging file size for all drives = your Max Ram in MB’s (16000/32000/64000 etc…)
    If correct, you are good to go, happy days again :slight_smile:
    If it didn’t save your changes, re follow the steps above and it should save the changes after restarting your PC again (I had to do it twice also).

Hope this helps other players with there Virtual Memory crashes.
Lastly, I also suggest checking for Graphics Card Updates which should be taken care of regulary anyways :smiling_face:

DeadClocks

EDIT: I just found the Reddit Post I referred to in this post.
The Poster & original solution sharer to this problem was:
5tyhnmik, a 2yr old post but it was the fix/work around that mattered.

5 Likes

Yeah, the game is a virtual memory hog. There’s a second option related to this called “DirectStorage” which allows the video driver a way to bypass some memory bandwidth issues. IIRC it allows drivers to directly load textures and assets into video memory without going thru system memory first. Unfortunately it’s a real “hit or miss” thing on the stability side at least with Diablo 4. If you’ve optimized your page file and are still having issues try disabling the feature. Simply add “-disableds” to the launch command for the game.

Lastly, a word of caution on drivers, do NOT always upgrade to the “latest” you need to check what the latest stable driver is. There was an issue with some recent nVidia drivers causing issues in October for example.

2 Likes

This is not a solution. It just potentially extends the amount of time before a crash or blue screen due to the memory leak spilling out until the pagefile is full. The issue is with the game. The developers are the only ones who can fix it. The problem is they are not actually skilled enough to fix it, and are too narcissistic to even admit it is caused by them.

All these steps are doing is having you set a fixed pagefile size, and making it much larger than it should need to be for any game or application to function properly. This should never “need” to be done by the “user”. Windows automatically governing the pagefile should ALWAYS be sufficient if the game/application is actually coded properly.

12 Likes

This should be set for any performance intensive game to 1.5x-2x your physical memory.
It is called setting the environment variables pagefile setting and has been suggested here by many people.

This alone will not fix the problem for everyone.

3 Likes

I have several SSD hard drives. I manually allocated 1TB of virtual mem each on 2 separate drives along with the Nvidia 561.09 driver (RTX4080, Intel 13900, 64GB ram) and the game has been stable. I can play for 8 hours+ straight with no issues. Prior to this I would CTD about every hour. I had no issues with game crashes until the expansion. I made both changes at the same time so I cannot say which one solved the issue. I am leaning towards the VM change but it was most likely a combo of both.

Good to know, I’m still a novice when it comes to understanding & solving pc issues that pop up when gaming but after trying it & the game running steadily for hours last night & today, I thought I would atleast share it in a new thread.
I totally agree with you after some thinking on it & it makes sense that it would only be slowing the issue down.
I’ll take the longer play times per restart needed/per virtual memory errors while I go blue in the face in hopes of it getting fixed by the Devs…
Thanks for your reply Jemuzu :+1:

1 Like

It might help, but the problem is how their coding is storing, freeing, and accessing memory and pagefile. They know this. That’s why there have been soooooooooooo many patches this season. They are plugging memory leaks as they find them.

3 Likes

It’s possible the developers are competent but they’re given lousy goals to work towards. There doesn’t seem to be any effort from on high to deal with long standing issues like broken quests. I just ran into this trying to clear the Stockade dungeon.

In the second zone where you’re supposed to collect Animus I killed every monster (I had Subo so I know I got them all) and I was missing one carrier’s worth of animus. I walked around the entire dungeon two times looking for some that might’ve dropped but I somehow missed and nothing. I had to abandon the dungeon since there was no way to fill the vessel and unlock the end boss.

How? How, after 18 months, is it possible for a basic quest mechanic to be broken like that? The answer seems fairly obvious – nobody at Blizzard cares about the quality of the game. As long as it boots (most of the time) and the store sells things for real money they’re happy. It’s why we got patches like the DLSS Debacle that took 2 weeks to resolve. Or why many PS5 players couldn’t even launch after a different patch. Basic “is it plugged in” type checks don’t happen in QA (if there even IS a QA team) because quality is not the goal.

2 Likes

Irrational flashback to Stormwind

1 Like

Please, fix. This problem never happened to me in previous season. 32GB DDR4 here

3 Likes

That game has some issues with DX12 and Vulkan causing crashing also, but not nearly as frequent and I think they are fixing them as it has happened a lot less than the first few days.

1 Like

:exploding_head:Wow that appears to be something a PC Master Repairmen might

try! I’m gonna have to wait n see if or when Buzzard comes up with

something

:unamused:

There is no memory leak in D4…All the leaks come from using unorthodox softwares that are unable to provide sustainable performance.

Nonsense, I never had issues regarding this.
What now sherlock?

Yes there is even blizzard already admitted just write this on google : Blizzard Investigating Major Memory Leak in Diablo 4

you must be a blizzard moderator wannabe because theres only 2 reasons why you would say something so stupid one is you want to become a blizzard moderator on here if thats it good for you you will become one of the most hated people on this website with all the other green coated wannabes on here. the other reason you never played diablo 4 on pc more then an hour playing in one sitting. you can play the game watch your ram slowly build up to the max and nothing not lowering at anypoint you can literally stand in town long enough let fokks come and leave the game move by you watch the memory max out

1 Like

also and to dead clocks post all he saying in that post is hes epxanding the allowable memory which will give you more time to play the game in some instances but will still crash evuentually

this is becuase someone in blizzard mass of bugs theres bug in the coding that doesnt allow the random memory to self delete and right more in its spot as things enter you screen and leave your screen so in turn its just builds up and eventually causes a crash

1 Like

until they acknowledge this and fine the error in there coding they will never fix this the problem is they care more about the money they making from the sales then the actual players itself and its sad becuase evntually everyone leave go to other games or back to d2 or even POE and its sad especially for me to have been player of diablo since 1999 to have to say after over 25s years of a game i loved and respected my whole life that i will have to leave to go other places, blizzard is not stupid they know they will lose alot of player based on this and they simply do not care they made there money on this game so why care now

and whats crazy mostly crazy is this is not a problem on the console i also own the game on console as well and never had this problem there but on pc that a different thing altogether

3 Likes

Yes I completely agree. Console is fine but pc I get lag and disconnects.

i dont have disconnection problems i have memory leakage problems both in the vram and the RAM which can only be caused by the devs poor development of the game not to do with pc set up i built alot of gaming pcs in my time i never seen a porblem with pc gaming as poorly as diablo 4
there was time i questioned battlefields franchise and there commit to the players but diablo and blizzard is by far the worst experience i have ever had with anything. i i see daiblo is perfect for gaming on the pc which is why i built a pc spefically tailored for diablo and to have it crash or in my instance go black screen then gets stuck there only thing i can do is press esc then hit exit diablo which is the only thing that works when that happens

1 Like