Lightroom Classic: Serious memory leak

  • 4
  • Problem
  • Updated 1 week ago
  • (Edited)
For a long time I am troubled by a huge memory consumption of my system. Today I digged more deeply into what is going on with all the memory being used by no processes. Windows 10 Task Manager was showing more than 21GB of RAM used. However, there were only three memory hungry processes listed in the Processes tab: Adobe Lightroom Classic CC eating up 3.5GB, Firefox 2.5GB and Adobe Bridge with roughly 1GB. All the processes listed could add up to no more than 8GB of memory.

In my next step I tried to follow this article: https://aloiskraus.wordpress.com/2017/02/26/the-mysterious-lost-memory-which-belongs-to-no-process/

RAMMap was showing 17.7GB in Active Process Private memory. It was clear from the Processes tab that all the remaining memory was allocated by the "MemCompression" process. I then decided to exit Lightroom Classic CC to see what hapens. Whooping 12GBs were released instead of the 3.5GB shown in Task Manager. When starting Lightroom again, 3.5GB is shown in Task Manager as before and the same amount shows in RAMMap under Lightroom's private memory.

I am using Lightroom Classic CC on my developer notebook with 32GB of RAM and do not currently have another machine with less physical memory available to test the behavior. In the time of discovering the issue I was working in the Development module with a set of 2 500 photos filtered to a view of only 224 images.
Photo of Lukáš Chmela

Lukáš Chmela

  • 5 Posts
  • 1 Reply Like

Posted 2 months ago

  • 4
Photo of Jeff

Jeff

  • 41 Posts
  • 16 Reply Likes
If you want to try this with less memory, you can limit the amount using the system configuration utility. Run sysconfig, select the Boot tab, then click advanced options. You can change the number of procs and the maximum memory. Then reboot. Make sure to set it back of course.
Photo of Katrin Serova

Katrin Serova

  • 2 Posts
  • 4 Reply Likes
Lightroom had this memory issue for as long as I can remember on the Mac platform too and it is still there in 8.1 Lightroom Classic release. It hogs up crazy amounts of RAM while doing simple things like preview generation, or image publishing to disk (and I am not talking heavy editing here).  I am saying like 10Gb of RAM plus 5 compressed memory on Mac OS Mojave. This is ridiculous, one has to restart it several times a day just to make it usable since it slows down as you keep using it. When will anybody at Adobe finally come to terms and address the issue? We pay subscription you know!
(Edited)
Photo of Tristan S

Tristan S

  • 2 Posts
  • 2 Reply Likes
I'm having some serious memory leak issues too. I open Lightroom, select a folder with ~2000 photos, select Metadata -> Read metadata from File. When finished, Lightroom uses 45 GB of RAM and needs to be restarted. (Lightroom 8.1 Mac version)
Photo of Rikk Flohr

Rikk Flohr, Official Rep

  • 4874 Posts
  • 993 Reply Likes
We’ve seen instances where malformed catalogs can cause excessive memory usage. To test this hypothesis please try the following.
  1. Select All Photos in Catalog Panel of Library Module
  2. [Ctrl/Cmd]+[A] to select all
  3. Right-click on any photo and select Stacking>Expand All Stacks
  4. [Ctrl/Cmd]+[A] to select all again
  5. File>Export as Catalog...
  • Save As: TestHighMemoryUsageCopy
  • Where: Desktop
  • Do not check  Export Negative Files or Build/Include Smart Previews
  • Check: Include available previews

Open the TestHighMemoryUsageCopy.LRCAT file in Lightroom and attempt the same operation(s) that caused the high memory usage.

Does the high-memory usage repeat with the test catalog?

Photo of Tristan S

Tristan S

  • 2 Posts
  • 2 Reply Likes
That fixed it in my case! I tested with a folder tree that contains 22,000 images successfully. Thank you Rikk!
Photo of Katrin Serova

Katrin Serova

  • 2 Posts
  • 4 Reply Likes
Thank you for the procedure Rikk, I will try it later today.  I do catalog optimization regularly, and it works with no errors. 
Wouldn't it be more proper for such an expensive product as Lightroom to be able to automatically fix "malformed" catalogs, or at the very least detect such errors and suggest the export/rebuild procedure?
P.S. Your "export as catalogue" procedure COULD be a viable option to refresh your main catalogue structure IF Lightroom had an option to retain all the publish services structure as part of the exported catalog. Sadly now this feature is sorely missing (why did LR developers chose to ignore the fact that some users have huge amounts of publish services configured, and would certainly like to have an option to export them, is beyond me!)
(Edited)
Photo of Ramona Boston

Ramona Boston

  • 33 Posts
  • 1 Reply Like
I do think Katrin is onto something here. It would be great to have a product that could manage the size of catalogs they claim to be able to handle without corruption. Especially since the official advice given is to store everything in one catalog. I'm here checking this morning because I"m once again trying to build a catalog by adding and leaving it run overnight. Doesn't work because the add process eats up too much memory. It's not even about paying a monthly fee, it's about the loss of time and work.If you want to claim to build professional tools you should build professional performance.
(Edited)
Photo of Ruby k

Ruby k, Employee

  • 11 Posts
  • 6 Reply Likes
Thanks for reporting issue. We have noted all the observations and working on it.
Photo of martijn Saly

martijn Saly

  • 203 Posts
  • 22 Reply Likes
I have a hard time believing this.
You could give your reply some struts and foundation by explaining what the dev team has found, what the status is, and what you are planning to do to fix this.

Since this problem has existed as of Lightroom 5.0 at least, you owe us one hell of an explanation.
(Edited)