The orphaned Lightroom Lock file

  • 1
  • Idea
  • Updated 1 year ago
  • Implemented
The problem of the catalog being used by another program seems to come up frequently in The Lightroom discussions. I wonder if it would be a good idea to have Lightroom check for a lock file when opening and delete that file before it creates a new one. It seems to me that something along this line could eliminate this problem.
Photo of James Hess

James Hess

  • 168 Posts
  • 23 Reply Likes

Posted 1 year ago

  • 1
Photo of Victoria Bampton - Lightroom Queen

Victoria Bampton - Lightroom Queen, Champion

  • 3829 Posts
  • 1268 Reply Likes
LR does already automatically delete it if it's sure it's safe. That's why we're not seeing the issue so frequently any more.
Photo of James Hess

James Hess

  • 168 Posts
  • 23 Reply Likes
Really? I wasn't aware that. Of course, I don't spend a lot of time trying to keep updated on changes. I was motivated to make this suggestion because the problem came up again in the Lightroom forum today. Do you know when it was implemented?
Photo of Victoria Bampton - Lightroom Queen

Victoria Bampton - Lightroom Queen, Champion

  • 3829 Posts
  • 1268 Reply Likes
Courtesy of Eric Scouten back in 2013 (so sometime before then):

"The lock file contains the process ID of the Lightroom process that first opened the catalog file. When you launch LR, if the lock file exists, it looks to see if there is a process by that ID still running. If there is, you get the warning. If not, we assume that the previous instance of Lightroom died an unfortunate death (power failure, crash, whatever) and we quietly delete the lock file."
Photo of Victoria Bampton - Lightroom Queen

Victoria Bampton - Lightroom Queen, Champion

  • 3829 Posts
  • 1268 Reply Likes
Long time ago. I'll see if I can dig up the old emails.
Photo of Todd Shaner

Todd Shaner, Champion

  • 913 Posts
  • 279 Reply Likes
I discovered this while helping someone who was sharing the same LR catalog on two systems and thought something was wrong. It uses a unique 4-digit code and time stamp in the Lock file that is apparently also stored in the LR Catalog. When LR launches and detects a Lock file that matches the data in the Catalog it safely deletes it and creates a new Lock file.  https://forums.adobe.com/message/9249330#9249330
Photo of Just Shot Me

Just Shot Me

  • 174 Posts
  • 41 Reply Likes
Actually the LOCK file get deleted when LR Closes. Which is the way it is supposed to work. The only time the LOCK file isn't deleted is if LR or the OS crashes and LR doesn't have the opportunity to delete the LOCK file. That is also how it is supposed to be. LR does not Delete that file when it is opened. That would be counter to what the LOCK files is there for, IE to stop 2 different instances of LR accessing the same catalog file at the same time.
So this is something Adobe won't and shouldn't change.
Photo of James Hess

James Hess

  • 168 Posts
  • 23 Reply Likes
Well, as Victoria has pointed out, Lightroom was changed a while back (apparently) so that if it can "safely delete" an existing orphaned lock file it will. So I'm guessing that most of the problems that show up in the Lightroom forum are "probably" coming from users with older versions of Lightroom. But I don't know that for certain.