Discussion:
[Darktable-users] Darktable won't start. Database locked...
Mark Heieis
2013-04-02 23:21:16 UTC
Permalink
Hello,

I had an unclean shutdown of Darktable and now it fails on restart.

It reports:

[init] database is locked, probably another process is already using it
ERROR : cannot open database

"ps aux" shows that there is no other instance of DT running.

How do I unlock the database? (Using DT 1.1.3)

Thanks.
Mark Heieis
2013-04-02 23:40:58 UTC
Permalink
Post by Mark Heieis
Hello,
I had an unclean shutdown of Darktable and now it fails on restart.
[init] database is locked, probably another process is already using it
ERROR : cannot open database
"ps aux" shows that there is no other instance of DT running.
How do I unlock the database? (Using DT 1.1.3)
Thanks.
I deleted the file ~/.config/darktable/library.db and now it starts
again. I didn't have much in the db so I don't think I lost much info. I
did save the db so I can recover it, if I find out how to "unlock" it.
Patrick Shanahan
2013-04-02 23:50:58 UTC
Permalink
Post by Mark Heieis
I deleted the file ~/.config/darktable/library.db and now it starts
again. I didn't have much in the db so I don't think I lost much info. I
did save the db so I can recover it, if I find out how to "unlock" it.
Shut down darktable *normally* and replace current library.db with your
saved version.
--
(paka)Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711
http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2
http://en.opensuse.org openSUSE Community Member
Registered Linux User #207535 @ http://linuxcounter.net
Mark Heieis
2013-04-03 02:41:56 UTC
Permalink
Yep. That worked. Thanks.

To summarize:

$sudo reboot
$cd ~/.config/darktable
$mv library.db library.db.orginal

start darktable as normal
close darktable

$cp library.db,original library.db

start darktable as normally done
everything was as it was before the dirty shutdown.

There're probably more elegant ways of clearing the lock, but this
approach worked for me.
Post by Patrick Shanahan
Post by Mark Heieis
I deleted the file ~/.config/darktable/library.db and now it starts
again. I didn't have much in the db so I don't think I lost much info. I
did save the db so I can recover it, if I find out how to "unlock" it.
Shut down darktable *normally* and replace current library.db with your
saved version.
Aahz Maruch
2013-04-02 23:52:16 UTC
Permalink
Post by Mark Heieis
I had an unclean shutdown of Darktable and now it fails on restart.
[init] database is locked, probably another process is already using it
ERROR : cannot open database
"ps aux" shows that there is no other instance of DT running.
How do I unlock the database? (Using DT 1.1.3)
Try rebooting, sqlite uses file locks. There may be a dot file in that
folder, it's been a while since I diagnosed sqlite locking issues.
--
Hugs and backrubs -- I break Rule 6 http://rule6.info/
<*> <*> <*>
Help a hearing-impaired person: http://rule6.info/hearing.html
Brendan Johan Lee
2015-03-03 15:19:55 UTC
Permalink
In case anybody stumbles into this thread, simply deleting
~/.config/darktable/library.db.lock does the trick.

Loading...