Calibre-web: Does calibre-web now lock the DB (preventing books from being added)?

Created on 19 Jan 2018  路  8Comments  路  Source: janeczku/calibre-web

It seems Books are no longer getting added via cronjob if calibre-web is running. Is this intentional?
root@nas:/dikkert/tmp/books# /opt/calibre/calibredb add --library-path=/dikkert/Server/Books Woodrow\,\ Margje\ -\ Verwoest\ 2017.epub

Traceback (most recent call last):
  File "site.py", line 77, in main
  File "site-packages/calibre/db/cli/main.py", line 253, in main
  File "site-packages/calibre/db/cli/main.py", line 55, in run_cmd
  File "site-packages/calibre/db/cli/cmd_add.py", line 374, in main
  File "site-packages/calibre/db/cli/cmd_add.py", line 152, in do_add
  File "site-packages/calibre/db/cli/main.py", line 190, in run
  File "site-packages/calibre/db/cli/main.py", line 177, in db
  File "site-packages/calibre/db/legacy.py", line 81, in __init__
  File "site-packages/calibre/db/legacy.py", line 48, in create_backend
  File "site-packages/calibre/db/backend.py", line 384, in __init__
  File "site-packages/calibre/db/schema_upgrades.py", line 19, in __init__
  File "site-packages/calibre/db/backend.py", line 844, in execute
  File "src/cursor.c", line 236, in resetcursor
BusyError: BusyError: database is locked

root@nas:/dikkert/tmp/books# service calibre-web stop
root@nas:/dikkert/tmp/books# /opt/calibre/calibredb add --library-path=/dikkert/Server/Books Woodrow\,\ Margje\ -\ Verwoest\ 2017.epub

The following books were not added as they already exist in the database (see --duplicates option):
  Verwoest
    /dikkert/tmp/books/Woodrow, Margje - Verwoest 2017.epub
question

Most helpful comment

If you're mounting your calibre library over CIFS, give https://coderwall.com/p/zrxobw/calibre-libraries-on-nas a try. Fixed this issue for me after unmounting my books share, adjusting the CIFS mount in /etc/fstab, remounting the share and restarting the container(s).

All 8 comments

I didn鈥榯 change anything regarding locking. I added a book via calibre 2 days ago, this worked. But if there is access to calibre-web in parallel, then this could happen, as calibre doesn鈥榯 expect somebody to access the database

unable to reproduce, cannot explain why it was locked

Ran into same issue. Installed Calibre Web and then Calibre told me that the database is locked and that it needs to rebuild it.

If you're mounting your calibre library over CIFS, give https://coderwall.com/p/zrxobw/calibre-libraries-on-nas a try. Fixed this issue for me after unmounting my books share, adjusting the CIFS mount in /etc/fstab, remounting the share and restarting the container(s).

Just wanted to add a comment, that I had the same issue (raspberry Pi + docker + CIFS) and adding nobrl as mentioned in the above link also worked.

@toozej Thanks! That did it!

on ubuntu server 18.04, the nobrl flagged worked. but i had to restart the server in order for the change to take affect. thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eubanks718 picture eubanks718  路  9Comments

gramakri picture gramakri  路  4Comments

sirprancelot picture sirprancelot  路  4Comments

floviolleau picture floviolleau  路  5Comments

dzialeczko picture dzialeczko  路  5Comments