Forum Discussion
Microsoft Excel 365 HUGE Memory Leak (50 GB RAM)
Hi!
I read this article yesterday and I was wondering if you could take a look at a very tiny program I created in Microsoft Excel. I can email you the Excel file if you are interested.
This program has an overwhelming SUPER SPEED MEMORY LEAK (from 200MB to 50GB in seconds!). I also created a 2 min. video. It crashes Windows 10 in seconds.
I have already created another Excel version (3.1 MB) that prevents this error but I am really curious to know your insights.
Program/Environment characteristics:
- 3 sheets: catalogs, transactions, report
- 4 tables: 3 catalogs ( 5 – 100 rows) + 1 transactional (60,000 rows)
- 3 Pivot Tables
- 2 Pivot Charts
- Very simple VBA
- Data Model with 3 tables.
- 6.0 MB file size
- Microsoft® Excel® for Microsoft 365 MSO (Version 2207 Build 16.0.15427.20182) 64-bit
- Windows 10 Version 21H1 (OS BUILD 19043.1889)
Problem occurs after hitting the Refresh button and then changing to the transactions sheet (60, 000) rows. Then RAM consumptions hits.
My guess is that a combination of:
- Application Screen Updating
- Freeze Panes
- 4K Monitor
- 60K data rows
- Data Model refresh??
- Calculated columns??
causes this error.
Have you ever experienced a similar behavior?
Thanks!
- NeedMoreRAMCopper Contributor
ExcelClaro I've been observing the same behavior for a while on files simpler than what you describe. In addition to the sudden memory spike, the video freezes. One of the triggers seems to be switching tabs -- perhaps while a previously invoked operation hasn't finished. However, other triggers exist that I haven't been able to identify. Fortunately, saving is possible, and I'm able to close Excel by clicking the X in the upper right of the window. However, the problem is annoying. A fix would be great.
Here's my setup:
OS: Win 10 21H2 Build 19044.1889
Processor: Intel(R) Core(TM) i9-9980XE CPU @ 3.00GHz 3.00 GHz (18 physical cores)
RAM: 128 GB
Video Card: NVIDIA GeForce RTX 2080 Ti running 3 4k displays via Display Port
Excel 365 Version: 2207 Build 15427.20210
- ExcelClaroCopper Contributor
NeedMoreRAM Thanks for your reply!
Yes, same symptoms here: video freezes and Windows crashes eventually if the Excel file is NOT closed immediately. I think it has to do with the freeze panes, switching among sheets, *4K display* and MAYBE thousands of records. By curiosity, this error does NOT come out when using one of my lateral monitors which are Full HD, not 4K.
Really annoying! 😬
Here is my setup:- DELL Precison T5820 Workstation
- Intel Xeon(R) W-2145 @ 3.7GHz 8 Cores / 16 Threads
- 64GB RAM DDR4 @ 2666 MHz
- Western Digital Black 500GB SN750 NVMe™ SSD 3,100MB/s read 1,600MB/s write
- NVIDIA Quadro M2000, 4GB GDDR5, 75W, 106GB/s, PCIe 3.0 x16, 4x DPs
- 1x BENQ PD3200U 32" 4K Ultra HD LCD Display Port
- 2x DELL P2719H LED 27'', Full HD, Widescreen, DisplayPort
EDIT: 2022/SEP/14
I have attached some pictures using Sysinternals Process Explorer and DLL Export Viewer. Somehow this library Mso40UIwin32client.dll has something to do with this error. It exposes these 4 functions:
MsoDoFontLinkRgwch 0x000000018026c530 0x0026c530 485 (0x1e5) Mso40UIwin32client.dll C:\Program Files\Microsoft Office\root\vfs\ProgramFilesCommonX64\Microsoft Shared\OFFICE16\Mso40UIwin32client.dll Exported Function
MsoPwlfFromFlinfo 0x000000018030b1b0 0x0030b1b0 1150 (0x47e) Mso40UIwin32client.dll C:\Program Files\Microsoft Office\root\vfs\ProgramFilesCommonX64\Microsoft Shared\OFFICE16\Mso40UIwin32client.dll Exported FunctionMsoCrCbvGet 0x00000001801ee190 0x001ee190 1933 (0x78d) Mso40UIwin32client.dll C:\Program Files\Microsoft Office\root\vfs\ProgramFilesCommonX64\Microsoft Shared\OFFICE16\Mso40UIwin32client.dll Exported Function
MsoFreeFlinfo 0x000000018030b970 0x0030b970 2751 (0xabf) Mso40UIwin32client.dll C:\Program Files\Microsoft Office\root\vfs\ProgramFilesCommonX64\Microsoft Shared\OFFICE16\Mso40UIwin32client.dll Exported Function
- NeedMoreRAMCopper Contributor
ExcelClaro I'll start documenting specifics here whenever I observe this phenomenon. One other note for now is that I've had instances where RAM usage has spiked to 80GB-90GB before returning back to the normal range for the file I'm using (generally 200MB-500MB). In those cases, video begins updating normally, and I can work with the file again -- even though subsequent memory spikes seem to happen more frequently. In other instances, the RAM usage goes past 90GB, but I've always closed Excel before reaching my system limit.
- Id_rather_rideCopper Contributor
ExcelClaro I’ve had this issue for a few months. It occurred after a standard windows and/or computer update. I didn’t take note at the time which update. I’ve only had issues with Excel no other programs.
I went through the standard options of clearing the roaming files, running XLStyles to clean the workbook, running in safe mode, updating windows, office, computer etc., uninstalling and reinstalling office, uninstalling and reinstalling office with support and recovery assistant, running the system file checker to repair files etc. None of these helped.
I noticed this error occurred when moving within a sheet or between sheets. It was not workbook dependent as it happened with different files some complex with macros, some simple without macros, some new, some old. All of those files worked without issue on different computers I also use (both cheaper laptops running windows 10 and both using 4K external monitor). It never occurred when idle, only when moving within a workbook.
In running Windows Event Viewer I discovered a Windows Hardware Error Architecture (WHEA) event with the PCI express root port every few seconds. This was caused by the Link State Power Management setting for PCI Express. Turning this off (from the default power saving mode) fixed the WHEA issue and after making this change I was trouble free for a couple of weeks. In the last two days I've had the issue again on a couple of occasions. Beforehand it was a continuous problem happening multiples time per hour.
Computer: Alienware Aurora R12, Windows 11, Office 365, 64Gb RAM, i7-11700k, Nvidia GeForce RTX3070, Samsung 4K
- tomoam2Copper Contributor
Id_rather_ride I have no WHEA errors. You should search for new drivers or BIOS on Dell website.
I'm testing new drivers (chipset AMD X570 + nVidia), but no luck.
Also I discovered there is an optional update KB5017380:
https://windowsreport.com/kb5017380/
"Fixed an issue that occasionally causes explorer.exe to stop working when explorer.exe opens"
- Id_rather_rideCopper Contributor
tomoam2 thanks for the reply. I've run all windows updates, updated all drivers etc. on the system. The WHEA errors disappeared once the Windows power setting for the PCI was changed. Today I set the display graphics for excel to high performance, no issues since but it's really just grabbing for straws at this point. Mine issue quite specific to the one machine, I've had no issues on two other laptops.
- JosvaBSCopper Contributor
I have experienced the same problem. Really frustrating. Have to close all my open Excel workbooks and then reopen - luckily it can be saved before closing. At least it has never crashed my computer.
Mine does it when changing sheets (mostly when doing it quickly I think) and sometimes also when going to 'the edge' of the sheet, either far right or to the bottom. Sometimes I end there by mistake when getting to eager on the CTRL+Arrows.
I've also tried much of the standard procedure found around with no luck.
My setup is a Lenovo Legion laptop, i7 8750H, 32GB RAM, nVidia Geforce RTX 2080 and Eizo 4K screen and Win11
- jcorbin_1968Copper Contributor
TO ALL READING:
I can reproduce this nasty Excel memory leak on my machine in a matter of a few minutes if anyone at Microsoft is willing to take a serious look at this. Always happens when manually clicking between several tabs in virtually any worksheet I have open, large or small, including using the Ctrl + PgUp and Ctrl + PgDn shortcut keys. This has been going on consistently for a few months now and Excel was working perfectly fine before whatever update from Microsoft took place. It has gotten to the point where I simply cannot get my accounting work done. Other suggestions in the other posts did not work. I will try the online (web-based) version next to see if there is any difference. Kindly fix this terrible memory leak, Microsoft.
- Id_rather_rideCopper ContributorMine has been ok since the last uninstall/reinstall with SaRA when adding the registry clean as suggested by tomoam2. I'm hoping that will last but I don't have much faith given past experience with the issue. Mine could be easily triggered by switching sheets or keyboard shortcuts to move within a sheet. It occurred on all sorts of workbooks with different degrees of complexity.
- JosvaBSCopper Contributor
JosvaBS I've found a work around. Today I had a sheet with a plot causing the memory leak every time the plot appeared or reapperead when navigating in the sheet.
Since many seems to have 4k screens I tried setting the resolution to full HD (1920x1080) and with this resolution the sheet worked fine! Setting the resolution back to 4k caused the leak to happen again.
It is quite a bad workaround having to look at full hd on a 4k screen..
- Jab_1260Copper Contributor
good idea for a temporary workaround.
hope next release will repair this issue.
regards
- aali0080Copper Contributor32 GB leak windows is all the way updated all gpu driver updated. we are talking a few colums and rows of data. Cycling between sheets as well as shortcuts to go to the top and bottom of the page causes the leak. if i had more ram it would eat all of it.
- Jab_1260Copper Contributor
I have the same problem.
version 2209 (build 15629.20208)
weird that 4 month afeter first occurence its not repaired.
Can't just not afford to reinstall the whole Ms-office
Still waiting for a solution
- Id_rather_rideCopper ContributorAssuming it works, there is no real issue with using the SaRA tool for uninstalling and reinstalling. I've done it multiple times. The last time I added the registry edit step and since then I've not had an issue. Not that I'm convinced it won't come back but so far so good. Just remember to backup email contacts etc.