Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 09-08-2011, 06:53 AM   #1
robertseetzen
Junior Member
robertseetzen began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Sep 2011
Device: Android
Unhappy "Database is locked" - can't use network folders

Hello,

whenever I try to use a network directory as the Calibre Library Folder, the program reports a database error.

It doesn't matter if I try to choose the folder when starting Calibre the very first time after a fresh install or after "re-running" the startup wizard from the calibre menu. The network folder is empty, no books were imported.

The error messages follow at the end of this post.

The background / scenario is: I want to use Calibre on my desktop PC as well as on my Notebook and Netbook - only one at a time, no concurrent access. All machines are running Ubuntu. The eBooks shall reside on a server, which is (no jokes) a windows 7 install, so the network mounts use samba / cifs.

Any help would be very appreciated, since I really like Calibre.

Robert Seetzen

- The error messages:

Traceback (most recent call last):
File "site-packages/calibre/gui2/main.py", line 215, in initialize_db
File "site-packages/calibre/library/database2.py", line 216, in __init__
File "site-packages/calibre/library/database2.py", line 332, in initialize_dynamic
File "site-packages/calibre/library/sqlite.py", line 314, in run
DatabaseException: database is locked
RemoteTraceback (most recent call last):
File "site-packages/calibre/library/sqlite.py", line 271, in run
OperationalError: database is locked
robertseetzen is offline   Reply With Quote
Old 09-08-2011, 10:05 AM   #2
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,427
Karma: 950001
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by robertseetzen View Post
Hello,
whenever I try to use a network directory as the Calibre Library Folder, the program reports a database error.
Putting the library on a network share is not supported. Some people have gotten this to work but it's not recommended. The SQLite db does not work well on a network share. I believed NFS doesn't work at all and SMB sometimes works.
user_none is offline   Reply With Quote
Old 09-08-2011, 10:10 AM   #3
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 13,588
Karma: 5126946
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by user_none View Post
Putting the library on a network share is not supported. Some people have gotten this to work but it's not recommended. The SQLite db does not work well on a network share. I believed NFS doesn't work at all and SMB sometimes works.
And "sometimes" is the worst possible case, because "Sometimes" your Library goes bye-bye

Avoid placing your data at peril on "Sometimes it fails" systems. Even if you really-really want to do it that way
theducks is offline   Reply With Quote
Old 09-08-2011, 01:10 PM   #4
ThR
Tatütatuter
ThR could sell banana peel slippers to a Deveel.ThR could sell banana peel slippers to a Deveel.ThR could sell banana peel slippers to a Deveel.ThR could sell banana peel slippers to a Deveel.ThR could sell banana peel slippers to a Deveel.ThR could sell banana peel slippers to a Deveel.ThR could sell banana peel slippers to a Deveel.ThR could sell banana peel slippers to a Deveel.ThR could sell banana peel slippers to a Deveel.ThR could sell banana peel slippers to a Deveel.ThR could sell banana peel slippers to a Deveel.
 
ThR's Avatar
 
Posts: 389
Karma: 3148
Join Date: Oct 2008
Location: Germany, Baden, Karlsruhe
Device: PRS-950, DR1000S (sold), HX4700
My calibre-database resides on a network share (NAS by Synology, accessing the database with three W7-PCs, no concurrent use, one after another) since I started with calibre. Sometimes I get "database is locked", but only if the laptop has lost its wlan-connection while calibre is running. Stopping and restarting calibre and the problem is gone.
ThR is offline   Reply With Quote
Old 05-30-2013, 02:56 PM   #5
bkqc
Junior Member
bkqc began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2013
Device: Galaxy S3
But what if I want to keep my book in a safe and accessible place? My MyBook Live NAS is automatically replicated which isn't the case of my local Hard Drive...
bkqc is offline   Reply With Quote
Old 05-30-2013, 04:55 PM   #6
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 949
Karma: 2574614
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Ubuntu Linux, Cybook Opus, Motorola Xoom with Mantano Premium
I use Linux, Ubuntu. I have my calibre library on a Synology NAS, and I use NFS to mount the NAS folders. Works perfectly. To improve performance I have placed Metadata.db on a local SSD, using a symlink.

I moved metadata.db to a folder on the SSD and created a symlink to metadata.db where metadata.db was originally. Works great. I have changed the script that start calibre so that when calibre is terminated metadata.db is copied to the NAS, so I have a backup.

But there are many opportunities for problems, if I had used SMB instead my calibre library would have been corrupted quickly because problems with how the filesystems is or isn't case sensitive.

If you feel that you don't know for sure what is safe, keep the calibre library on a local filesystem. Use the NAS as a backup media, and run backup automatically after you quit calibre. Edit the script that launch calibre. But it is possible to mess that up as well, if the case sensitivity of the NAS filesystem is different from the local filesystem.

I belive that if you use Windows, then a SMB or CIFS share on the NAS works ok. If you use Linux, then a NFS share works ok. If you run a Mac then I don't know...

But no guarantees, test carefully before you trust anyone or anything.
Adoby is offline   Reply With Quote
Old 06-02-2013, 02:59 PM   #7
mark1softie
Junior Member
mark1softie began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jun 2013
Device: kobo touch
Question What has changed?

Quote:
Originally Posted by user_none View Post
Putting the library on a network share is not supported. Some people have gotten this to work but it's not recommended. The SQLite db does not work well on a network share. I believed NFS doesn't work at all and SMB sometimes works.
I have used Calibre to manage my NAS-mounted database for over a year, with no database errors, except in the past two weeks.

Still using Ubuntu 12.04 LTS [with all repository package updates applied], with my "~/Documents/eBooks_Calibre" directory on a Netgear ReadyNAS Duo, mounted using NFS.

Using sqlite3 (3.7.9-2ubuntu1.1), last updated in August 2012
Using NFS 1.2.5-3ubuntu3.1, last updated September 2012.

Have updated Calibre at least twice in the last couple of weeks, now at 0.9.33. Could something in the Calibre Python code have changed, forgetting to unlock the database?

Now get a "DatabaseException:database is locked RemoteTraceback (most recent call last): File "site-packages/calibre/library/sqlite.py", line 272, in run OperationalError: database is locked:

calibre, version 0.9.33
ERROR: Unhandled exception: <b>DatabaseException</b>:database is locked
RemoteTraceback (most recent call last):
File "site-packages/calibre/library/sqlite.py", line 272, in run
OperationalError: database is locked

Traceback (most recent call last):
File "site-packages/calibre/gui2/metadata/single.py", line 526, in next_clicked
File "site-packages/calibre/gui2/metadata/single.py", line 469, in apply_changes
File "site-packages/calibre/gui2/metadata/basic_widgets.py", line 102, in commit
File "site-packages/calibre/library/database2.py", line 2550, in set_title
File "site-packages/calibre/library/database2.py", line 652, in set_path
File "site-packages/calibre/library/database2.py", line 1540, in add_format
File "site-packages/calibre/library/sqlite.py", line 315, in run
DatabaseException: database is locked
RemoteTraceback (most recent call last):
File "site-packages/calibre/library/sqlite.py", line 272, in run
OperationalError: database is locked
mark1softie is offline   Reply With Quote
Old 06-02-2013, 03:48 PM   #8
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 3,932
Karma: 777817
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Calibre does not officially support library files being on a network drive precisely because of the fact that network drives often have problems with lock handling. Quite why it has been working up to now and has only recently started failing I have no idea.
itimpi is online now   Reply With Quote
Reply

Tags
database, error, library, linux, network

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Touch "Updating Reading Life" = "Network error" m_bisson Kobo Reader 5 07-15-2011 01:05 AM
SONY pocket edition: "Device locked" + "charge battery" obstacles? hermes Devices 3 06-02-2011 03:32 AM
"Content locked..." with Kobo books - questions JVM Kobo Reader 4 04-18-2011 08:58 AM
Request Open "Locked" LCD screen when 'reader' function icon pressed. Eddy R enTourage Archive 10 12-07-2010 08:09 PM
"Locked" 505 will not show in eBook Library SoCal Bob Sony Reader 1 10-16-2007 12:57 PM


All times are GMT -4. The time now is 06:20 PM.


MobileRead.com is a privately owned, operated and funded community.