• Welcome to the Lightroom Queen Forums! We're a friendly bunch, so please feel free to register and join in the conversation. If you're not familiar with forums, you'll find step by step instructions on how to post your first thread under Help at the bottom of the page. You're also welcome to download our free Lightroom Quick Start eBooks and explore our other FAQ resources.
  • Stop struggling with Lightroom! There's no need to spend hours hunting for the answers to your Lightroom Classic questions. All the information you need is in Adobe Lightroom Classic - The Missing FAQ!

    To help you get started, there's a series of easy tutorials to guide you through a simple workflow. As you grow in confidence, the book switches to a conversational FAQ format, so you can quickly find answers to advanced questions. And better still, the eBooks are updated for every release, so it's always up to date.

Using entire RAM & crashing / Sync from CC

Status
Not open for further replies.

Jay Clulow

Photographer | Retoucher
Joined
Apr 27, 2016
Messages
58
Location
Stockport
Lightroom Experience
Advanced
Lightroom Version
Classic
Lightroom Version Number
Classic 12.1
Operating System
  1. macOS 13 Ventura
Hello,

My entire library was imported into Lightroom Desktop (CC). This now exists on one laptop and entirely in the cloud on a 4TB plan.
I have a second laptop that I have have Classic on. It is now downloading the entire library onto that machine via Lightroom CC / Mobile. This is roughly 1.2 TB.
The files are downloading and after about 30min - 1 hour the memory usage jumps from 1 - 3GB to 40+ (Its an M1 MacBook and it only has 16Gig of RAM anyway so a lot of this must be swap).
At that point it either crashes Lightroom or I have to quit. I basically get a message saying the system is out of memory.
Is there any workaround to this. What I am having to do at the moment is just monitor the progress and close Lightroom when the memory starts to skyrocket.

Also strangely Classic says it now stored 13k of images with another 7k in the sync window downloading. However the entire library is roughly 32,000 and that was the figure it started out from.
 
Hi Jay

Sorry this one was missed. There is a memory leakage bug currently, and downloads aren't swift either. Current advice is to do just as you are (close and restart) - fortunately Lr picks up the sync from where it got to.
 
Jay, I recently did the same thing for many fewer images. I watched it myself for a while . Then I wrote a simple little AppleScript to quit and relaunch Lightroom every ten minutes. Since, indeed, Lightroom picks right back up this got the download done without me having to monitor it personally.
 
Ok, in case it's useful to @Jay Clulow I'm going to post two scripts in the replies here. The first is the one I used that got my sync down completed. It's simple but inelegant; it just asks Lightroom Classic to restart every ten minutes. The memory bug never bit me in that amount of time.

The second is significantly more complicated but also should only stop Lightroom Classic when the memory usage goes over 20GB. That was kind of the crossover point I was seeing on my M1 Mac mini with 16GB of actual ram.

Hope these are useful to someone.
 
Code:
repeat
    tell application "Adobe Lightroom Classic"
        activate
    end tell
    
    delay 600
    
    tell application "Adobe Lightroom Classic"
        quit
    end tell
    
    delay 30
end repeat
 
Code:
-- Do not have Lightroom and Lightroom Classic running at the same time; the script cannot tell them apart when checking memory usage.
set appName to "Lightroom" -- Used for getting memory via grep
set appNameLaunch to "Adobe Lightroom Classic" -- Used quit and launch Lightroom classic

set logTime to (current date) -- prep for logging
log {"Log started at: ", logTime}

tell application appNameLaunch to activate -- Fire up Lightroom

-- Start the loop to check memory usage and restart app if necessary
repeat
    -- Get the current time
    set currentTime to (current date)
    
    -- This works for MacOS Ventura 13.2. Top may return different info on different versions. Adjust accordingly. As of now it returns, for example, "Adobe Lightroom  1731M"
    -- It returns memory usage in megabytes; 1731M is 1.731 gigabytes, for example.
    -- Also, it returns multiple processes for Lightroom. The "top" command is sorted by memory usage so the first one will be the biggest.
    set memUsageChars to do shell script "top -l 1 -o mem -stats command,mem | grep \"" & appName & "\" | awk '{print $3}'"
    
    --This strips off the trailing M and converts to a number of megabytes
    set firstMemUsage to word 1 of memUsageChars
    set shortFirstMemUsageString to (characters 1 through -2 of firstMemUsage) as string
    set memoryUsage to shortFirstMemUsageString as number
    
    
    -- Check if memory usage exceeds 20 GB
    if memoryUsage > 20000 then
        -- Restart the app
        log {"Restarted at: ", currentTime, "megabytes: ", memoryUsage}
        tell application appNameLaunch to quit
        delay 30 --wait 30 seconds before restarting; let things settle down
        tell application appNameLaunch to activate
    end if
    
    -- Log the memory usage every minute
    if currentTime - logTime ≥ 60 then
        log {currentTime, "megabytes: ", memoryUsage}
        set logTime to currentTime
    end if
    
    delay 15 -- Loop every fifteen seconds
end repeat
 
Status
Not open for further replies.
Back
Top