# Long Running Memory Usage Issue



## Rob Edgcumbe (Feb 17, 2018)

Operating System:Windows 10
Exact Lightroom Version (Help menu > System Info): Lightroom Classic CC 7.2 (and back to 6.12)

This issue runs back a long time.  When I upgraded to Lightroom 6.12 last year, I suddenly had tons of trouble with performance.  The system became horrendously slow.  Imports bogged down and any amount of work made the system unresponsive.  I started tracking the system through Task Manager and the RAM was maxing out.  I talked to Adobe support and they had a run with the machine and managed to make it so unresponsive it crashed out of the sharing program they use.

I tried for a while with config.lua files based on things I had found online and this made things slightly better but not back to the level of responsiveness I was used to.  The program was becoming unworkable for any amount of useful searching and processing.  Another session with Adobe changed the preferences on my folders as they thought the size of them might be an issue but this didn't change anything.  The update to Lightroom 7 was something I was hopeful about but no difference.

When 7.2 came out and talked about a rebuild of the processing approach, I thought this might be it.  Indeed, when I first tried it, things seemed to be fixed but, alas, it seems to have reverted to the old ways.  I attach a YouTube clip of what happens to RAM when I use the system.  This video shows the RAM trace steady when I open the Catalog in all photos and then, when I change to a collection, you will see what the RAM does.  This is when I am doing nothing at all.  If I were to carry out edits during this, I would start to get the C Drive maxing out as RAM is already maxed and things get really boggy.  If I wait long enough, the RAM will eventually drop to about 70%.  Exiting will cause RAM to spike again for a while and then drop a while after the program is supposed to have closed.

Any great ideas out there how to resolve this?

https://www.youtube.com/watch?v=Pd_OBI9SRRc


----------



## Jim Wilde (Feb 17, 2018)

I don't see anything like that (fortunately). Does this happen every time you start LR? And if so is it an immediate thing, or is there some period of "normal" running before the memory usage starts climbing like that? If it's pretty immediate, have you tried creating a new catalog, import a few files, and see if the same issue appears?


----------



## Rob Edgcumbe (Feb 17, 2018)

When I open up, things are fine initially.  Then, if I start doing something, the memory growth starts, even if I don't do anything else.  Leave everything alone long enough, it will eventually drop back a bit but more activity will make it spike again.  I have a couple of catalogs and both of them are affected.  Good idea about a new catalog.  I shall try that later when I get home and see what happens.  Thanks


----------



## Linwood Ferguson (Feb 17, 2018)

Frankly this looks like a bug.  What is it doing at the time, functionally -- in the video you mention switching collections, do all the photos visible in the collection have previews already built, or is it building previews at the time?  I.e. any idea what kind of "thing" that LR should be doing at the time?  Is the collection a smart collection with some kind of selection criteria that it is parsing and searching?   Are any big images, panorama DNG's, or such present and it's building previews?

I realize this sounds like a silly question but is the program taking all the memory Lightroom?  If you switch back to it, is there any useful information shown in the process view? 

Do you have the background tasks for previews build enabled?  Any other background tasks going, such as plugins, writing XMP, etc.? 

Are specific photos involved, i.e. if you did the same thing with a collection that is definitely for other photos does it do the same? 

That it is at 50% CPU implies LR is trying to run something (I'm assuming this is lightroom of course, worth checking) -- I think the trick is to try to figure out what it is trying to do.  I understand from your comments you are doing nothing -- but it thinks it is doing something.  LR is very active in background all the time.

If you are Windows technical, you can get process monitor and have it show you all file activity (maybe filtering for something like opens, and image contains lightroom) and if it is doing things like preview builds, you can see the files it is accessing.  Conversely if it is doing any writes or other activity you might be able to see that, but as a caution it collects a HUGE amount of data, so you have to do some pre-emptive filtering to make it usable.  Link for the tool here.  Again, not for the Windows novice, it's a complex tool that can easily collect so much data it crashes the machine, but it's from a safe source (Microsoft, now, use to be sysinternals).


----------



## Rob Edgcumbe (Feb 18, 2018)

I created a new catalog and imported a huge number of images to it.  No problems doing that.  It was late so I have to go back in and try editing stuff.  I have also exported a full copy of one of my other catalogs and will test that when i get back later today.  Thanks for the suggestions.  I downloaded process monitor.  It is a bit more intimidating that Process Explorer which I have been using for a while.  I will see what I can manage with it.  On the example I gave before, this was a repeatable process.  The video was shot the second time I ran this approach.  It is a catalog which is long established.  Previews are generated, I don't write to XMP automatically - only when I choose to - and my plugins should not have been active.  I had the whole problem, closed the program, opened up again ready to record the video and managed to replicate it exactly.  A strange situation.  I am wondering if there is some corruption in the catalogs or whether there is a system conflict in my machine that doesn't like Lightroom.

Later tonight (US West Coast) I will get to try more stuff and will report back.  Cheers!


----------



## Linwood Ferguson (Feb 18, 2018)

@Rob Edgcumbe if you ran the process part of task manager, does it show up as in Lightroom?   The memory and process use?   I know that seems like an obvious question (and probably is), but just wondering if something else is interacting, e.g. an anti-virus program or some such?


----------



## GrahamP (Feb 21, 2018)

No idea how to solve it, but I am having a similar issue (Windows 7 x64, Lightroom 7.2).  After a period of intense processor use (in my latest case, creating many HDRs) the RAM is not released, even after closing Lightroom.  Recently I had task manager running when I closed Lightroom, at which point it was using over 15 GB of my 20 GB RAM, and when I came back a long time later task manager was still showing nearly 15GB still being used.  For edits involving a lot of local adjustments or spot removal, I am reverting to my previous practice of closing Lightroom after every few edits then restarting it before continuing, otherwise I still get a significant slow-down.

Graham


----------



## Linwood Ferguson (Feb 21, 2018)

@GrahamP, especially for you if it's not going back after you close lightroom, what process does task manager show the memory being consumed by?  If Lightroom is actually closed, it must be something else?   Note Lightroom does take a while to run-down, longer when it has a lot of threads and memory to deallocate.


----------



## GrahamP (Feb 21, 2018)

I looked at Applications which showed nothing.  I should have looked at Processes, but did not think to do so, but it could only have been Lightroom.  I was away quite a long time, maybe half an hour or so (I went to get something to eat).  I had been stressing Lightroom for several hours with loads of headless HDRs - some 200 of them, 3 x RAW images each time from a Canon 5D Mark IV.  Since the memory was tied up, I simply restarted the computer to clear it.  With hindsight I wished I had paid more attention to the timing and the processes, but I was not expecting anything like this to happen when I closed Lightroom and went away to do something else, and once I returned to the computer all that was really on my mind was that I wanted to get back to working on it.

Graham


----------



## Rob Edgcumbe (Apr 24, 2018)

My apologies for the long delay before I came back to the forum to update on progress.  I have been trying a bunch of things but also traveling a lot and I moved to a new house so it has taken a while to get back to this.  I may have made some progress but it is hard to tell for sure. 

I tried running procmon.  I am a bit of a novice but I gave it a go.  Boy is there a ton of data and knowing where to look is the hardest part.  However, it did crash out after a while so obviously was a bit much for the system (or so much was happening it got overwhelmed).  I didn't manage to conclude anything with this.  However, I did go on a voyage of hardware testing.  I figured if this is system specific then there is a good chance it is a hardware issue.  Consequently, I tried moving the catalog to another drive, disconnecting individual drives and so on to see if there was a weak link in the hardware that was causing the trouble.  None of this threw up any issues.

Most recently, I thought about what I could change to see if it affected anything.  I figured the RAM was the easiest (and possibly cheapest) thing to change so looked into what the best RAM was I could get for my motherboard.  In researching that, I got into RAM timings and decided to check the timings of my RAM.  I had let the motherboard work on auto mode but when I checked, I saw that it has the RAM at the wrong speed and all of the timings were not what the RAM recommended.  I changed all of these things and ran Lightroom and it ran without any trouble.  Memory usage stayed very low.

Sine then, the memory usage has gone way up again but the performance does not seem to be impacted.  I have had these moments of thinking it was cracked before only for things to go south again but, at the moment, I am feeling rather hopeful.  Thanbks for all of the suggestions and apologies again for the delayed response.


----------



## Victoria Bampton (Apr 25, 2018)

That's great news, thanks for reporting back Rob.


----------



## Trailhawk (Apr 28, 2018)

I'm glad finally others have posted that they also have this memory problem. I've seen it now for years. LR6 all versions. I built a new high end Windows 10 computer (Super fast CPU, 64MB of Ram, Fast Hard Drives). We notice memory gets full when moving pictures to Collections and changing the order of pictures (dragging and dropping) within collections. LR runs okay for first 5-10 minutes but then locks up. Closing the program and restarting the computer fixes it but it will do this again. If we are just in Library module looking at pictures, developing a picture or even importing or printing, we don't have this memory issue. But if we are moving pictures into and out of Collections and sorting Collections which we do frequently, it happens every time after a while. Interesting to me that Classic 7 has continued this and not all are seeing this occur. At this point we live with it. I won't be moving to Classic CC. If we have to move it will be time to consider moving away from Adobe for cataloging, developing and printing.


----------



## Victoria Bampton (Apr 30, 2018)

RJ6031570, Classic did make a bunch of changes to better utilize high spec machines, so it might be worth a trial on a test catalog.


----------



## Rob Edgcumbe (May 10, 2018)

Sadly, whenever I think I have a solution, the problem seems to recur before too long.  I am back in trouble again.  Keywording and sorting seem to be problematic.  If I am doing a bunch of edits in Develop, this seems to be able to handle it okay.  I am also getting lockups now after imports (which are slow themselves these days) with a blue rotating circle coming on and not going away.  Boy this is frustrating!


----------



## Victoria Bampton (May 10, 2018)

Any external devices attached Rob? I'd try disconnecting them if so. There's one current issue showing up with Lightroom hanging when external devices go to sleep or get disconnected, and I wonder whether there might be further-reaching consequences of the same issue.


----------



## Rob Edgcumbe (May 12, 2018)

The hanging often coincides with pulling the CFast card from the reader which could be the issue you are referencing.  Interesting.  Also, something new and confusing is occuring in that I am running Lightroom and I see high memory usage and CPU usgae but Lightroom isn't showing up in Task Manager.  That seems awfully strange.  I don't know whether that is a symptom that identifies a larger problem or just a side weirdness.


----------



## GrahamP (May 14, 2018)

Lightroom does still seem to have problems releasing memory.  About a week ago I bought a high end a win 10 desktop computer, pretty much top of the range and geared towards Lightroom and Photoshop use.  For the first time, I am able to use GPU acceleration.  In the Develop module, I am noticing that, having edited and zoomed into one image, when I move on to the next one and during editing look at this at 100%, for the briefest of moments the previous image I was editing flashes up, even though I finished editing it some time ago.  From my non-technical perspective, it seems that Lightroom has simply not released the memory allocated to the previous photo until it is forced to do so by an edit of the next image which is incompatible with what it already has in memory.  I am sure this is not an accurate techical explanation, but it is the best description I can give of what I am regularly and repeatable seeing.  

BTW, have others noticed a change in behaviour of presets following the profiles changes?  I have a number of simple presets, for example setting sharpening to 30.  If sharpening was already at 30, nothing used to happen if I tried to apply the preset again - Lightroom knew it achieved nothing.  Now it seems to have lost that knowledge.  Apply a preset such as this once, then do a few more edits, and apply it again, and it appears as a step in the Develop history.  Do it again immediately and nothing happens, but carry out another edit (not affecting sharpening), apply it again, and it then appears again in the Develop history, even though it made no changes.  It seems like a new bug to me, although I guess it does not make a great deal of difference unless it is symptomatic of some bigger underlying problem, but in my view it is better to keep the Develop history as short as possible if a non-step such as this makes no actual changes.

Many commentators seem to be raving about the new profiles changes. For myself, I see no reason to change from my import presets which set my default preferred profile, but each to their own.  I would prefer the option to send the profile settings to their proper place at the bottom of the Develop module rather than taking up space at the top (I do like the move of Dehaze though).  Even better would be the ability of the user to re-order the groups on the right so that those who want profiles at the top can have them, but those who do not can continue as before (the ability to re-order all of them would be even better, but I doubt we are going to see this anytime soon).  To me it seems dopey that profiles generally are at the top of the list, but if you want to make any tweaks to the Calibration then you have to scroll all the way to the bottom to do this (yes, I know I could use Solo mode to avoid scrolling at least in part, but this is not my preferred way of accessing the various Develop settings).

Graham


----------



## Victoria Bampton (May 17, 2018)

GrahamP said:


> I move on to the next one and during editing look at this at 100%, for the briefest of moments the previous image I was editing flashes up, even though I finished editing it some time ago.  From my non-technical perspective, it seems that Lightroom has simply not released the memory allocated to the previous photo until it is forced to do so by an edit of the next image which is incompatible with what it already has in memory.



That one sounds like a GPU bug. I'd guess if you turn off GPU in preferences, it'd probably stop doing that.


----------



## Rob Edgcumbe (Jun 3, 2018)

Getting more and more trouble running Lightroom at the moment so tried the SQLite approach to seeing if there was corruption in the catalogs.  That didn't seem to go too well.  Tried it on both of my catalogs and got an insufficient memory error for both of them.  For the bigger of the catalogs, watching the memory usage creep ever upwards was just like watching what happens when running Lightroom itself.  Any thoughts on how this might be investigated further?  Any good third party resources for checking catalogs for corruption?


----------



## Victoria Bampton (Jun 3, 2018)

Have you tried Lightroom's own integrity test when starting LR?


----------



## Rob Edgcumbe (Jun 3, 2018)

Yep.  They don't get flagged for an issue.


----------



## Victoria Bampton (Jun 4, 2018)

Rob Edgcumbe said:


> The hanging often coincides with pulling the CFast card from the reader which could be the issue you are referencing.


That's a known issue, should be fixed in the next update.


----------



## Rob Edgcumbe (Jun 7, 2018)

Tried opening the catalog on a different machine to see if it was computer specific.  Seemed fine at first but then as soon as I started working with the keywords, the memory spiked again and the machine got into trouble doing anything.  Couldn't even exit Lightroom unless I killed it in Task Manager (which was also hard to open when things were struggling).  Consequently, there does seem to be an issue with the catalog rather than the machine.  (Glad I found out before investing in a new computer!)  Any suggestions as to someone who is able to analyze catalogs for corruption issues?


----------



## Victoria Bampton (Jun 7, 2018)

If you don't use Publish Services, my first port of call would be to select all the photos and go to File menu > Export as Catalog. That'll transfer basically all edits (minus Publish Services,  cloud sync data and potentially some plugin data) to the clean catalog, and usually leaves cruft behind.


----------



## Rob Edgcumbe (Jun 8, 2018)

Giving that a try this evening Victoria.  I do use Publish Services so it will be a bit of a nuisance but it might show where the problem lies.  Thanks for the suggestion.


----------



## Rob Edgcumbe (Feb 17, 2018)

Operating System:Windows 10
Exact Lightroom Version (Help menu > System Info): Lightroom Classic CC 7.2 (and back to 6.12)

This issue runs back a long time.  When I upgraded to Lightroom 6.12 last year, I suddenly had tons of trouble with performance.  The system became horrendously slow.  Imports bogged down and any amount of work made the system unresponsive.  I started tracking the system through Task Manager and the RAM was maxing out.  I talked to Adobe support and they had a run with the machine and managed to make it so unresponsive it crashed out of the sharing program they use.

I tried for a while with config.lua files based on things I had found online and this made things slightly better but not back to the level of responsiveness I was used to.  The program was becoming unworkable for any amount of useful searching and processing.  Another session with Adobe changed the preferences on my folders as they thought the size of them might be an issue but this didn't change anything.  The update to Lightroom 7 was something I was hopeful about but no difference.

When 7.2 came out and talked about a rebuild of the processing approach, I thought this might be it.  Indeed, when I first tried it, things seemed to be fixed but, alas, it seems to have reverted to the old ways.  I attach a YouTube clip of what happens to RAM when I use the system.  This video shows the RAM trace steady when I open the Catalog in all photos and then, when I change to a collection, you will see what the RAM does.  This is when I am doing nothing at all.  If I were to carry out edits during this, I would start to get the C Drive maxing out as RAM is already maxed and things get really boggy.  If I wait long enough, the RAM will eventually drop to about 70%.  Exiting will cause RAM to spike again for a while and then drop a while after the program is supposed to have closed.

Any great ideas out there how to resolve this?

https://www.youtube.com/watch?v=Pd_OBI9SRRc


----------



## LouieSherwin (Jun 8, 2018)

Rob Edgcumbe said:


> Giving that a try this evening Victoria.  I do use Publish Services so it will be a bit of a nuisance but it might show where the problem lies.  Thanks for the suggestion.



Rob,

There is a plugin lrvoyager that will move the Publish information from one catalog to another. I have not actually had to use it myself but I have heard of others successfully using it in similar situations. 

-louie


----------



## Rob Edgcumbe (Jun 9, 2018)

Interesting.  The exported catalog doesn't seem to be much of an improvement so it may be redundant but that is a cool plugin to know about.  Thanks.


----------



## Rob Edgcumbe (Nov 2, 2018)

Time for an update for those of you that wondered what happened here.  It turns out the catalog was not corrupted.  Courtesy of a very helpful Lightroom expert, I got a copy of my catalog to an Adobe engineer and they were able to see the same issues.  It turns out that something in the 6.12 update changed the way the smart collections were handled.  My catalog has a very large number of smart collections as a result of the workflow I use.  These were the cause of the memory maxing out.  I was sent a modified version of Lightroom 8 designed to sort this issue out and it is working like a charm.  Everything is running as smoothly as it used to.  They still have a concern about a longer term growth in memory usage but I am not having any issues at the moment.  This update will be in the next release.  I am massively relieved. Thanks for all of the suggestions people provided as we got to this point.


----------

