Lightroom Classic: Catalog lock file issue

  • 1
  • Problem
  • Updated 7 months ago
  • (Edited)
When I close Lightroom and open it again, I get the error message "The Lightroom catalog named "Lightroom Catalog..." cannot be opened because another application already has it opened." I understand this is caused by failure of the lock file to be removed from the catalog folder. Dragging the lock file to the trash solves the problem... temporarily. The problem occurs every time I open Lightroom. The Lock file refuses to be automatically deleted when shutting down Lightroom. Does anyone know of a way to automatically delete the lock file when I close Lightroom? I never had this problem until after I installed the newest version of Lightroom. Thanks for any help.
Photo of Steve Fellers

Steve Fellers

  • 2 Posts
  • 0 Reply Likes

Posted 7 months ago

  • 1
Photo of Johan Elzenga

Johan Elzenga, Champion

  • 2920 Posts
  • 1253 Reply Likes
Deleting the lock file would be a poor work around. You’ll need to find out why Lightroom is not closing properly, because this could damage your catalog one day.
Photo of Rikk Flohr

Rikk Flohr, Official Rep

  • 7584 Posts
  • 1730 Reply Likes
If you open a new blank catalog and then close it does it leave behind a .lock file?
Photo of Steve Fellers

Steve Fellers

  • 2 Posts
  • 0 Reply Likes
I made a new blank catalog, closed it, then opened it without any problem. I guess that means there's an issue with that one particular catalog. For what it's worth, I get this message only if I exit Lightroom, and then open it again without rebooting my computer. If I turn it off for the night, then turn it back on the next day, Lightroom opens fine.

Photo of Rikk Flohr

Rikk Flohr, Official Rep

  • 7545 Posts
  • 1729 Reply Likes
That tells us a lot. The Catalog may have an issue. If you are willing, you can send it to me and I will run a repair script on it. It may cure it.

Otherwise, I would recommend taking a look at recent backups to see if they have the problem. 
Photo of Dan Hartford Photo

Dan Hartford Photo

  • 453 Posts
  • 212 Reply Likes
That is odd indeed.  Thinking through what could be different after a re-boot and just before the reboot and the pickings are slim.  But here are a few ideas in addition to Rikk's suggestions. 

1)  Perhaps you have some sort of Backup utility running in the background (may be one backing up to the cloud or a slow drive)  Perhaps even Time Machine or the equivalent in Windows and when LR wants to delete the Lock file it can't because it is in the process of being backed up.   A test is to close LR then wait awhile to see if the lock file eventually goes away.  You may also want to exclude "*.lock" files from your backup systems.

2)  Also look at this.  When you shut down LR, and the lock file remains, take a look at Task Manager (or Mac Equivalent) to see if LR Classic is indeed no longer running.  Just noting that it is no longer on the task bar is insufficient.  On my windows computer at one time a corrupt file in the OS kept programs from terminating properly

3)  Along those same lines as #1, is your catalog folder synced to a cloud service such as One-Drive?  If so, try disabling that for a bit and see if there is any change (grasping at straws here).  

4)  the only other thing that comes to mind is a glitch in your Operating system's lock management routines.  You may want to see if your OS has a repair tool and if so run it and see if it finds anything to fix.