-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Issue] "database locked" errors #64
Comments
So it's a different problem than in #55 (comment) ? The database locked error suggests permissions aren't set correct. Is the database read/write accessible for the PGID/PUID you specified in the compose file? |
To be honest - i am not sure if it is the same. I would say it is at least similar. I am not on a SynologyNAS but the database is a mounted Samba/CIFS.sahre Within the container the Folder is mounted like this: drwxr-xr-x 2 abc abc 0 Sep 1 22:43 calibre-library and the database-file like this: -rwxr-xr-x 1 abc abc 6156288 Aug 10 18:57 metadata.db Outside the container I mounted it with PUID 1000 and GUID 1000: drwxr-xr-x 2 t***r t***r 0 Sep 1 20:43 books
-rwxr-xr-x 1 t***r t***r 6156288 Aug 10 16:57 metadata.db (t***r is the correct name of the default user and group) I hope that helps. |
Hi @JoBilert , when do these "database locked" errors occur? As in what triggers them while you are using CWA? |
Whenever I try to write into the database. Reading from it works fine. But I cannot delete books, edit metadata or add new books via "ingest". |
Can you run |
using fuser outside the container gives me the following result: /home/t***r/books/metadata.db:
t***r 2017383 F.... python3 Inside the container I cannot use fuser as it is not available. |
Copied the database out of the folder, deleted database and copied it back in. No change. Copied the database outside the folder and remapped the docker-volume Changes worked, but I obviously couldn't open any books anymore. |
Getting the same issue - whenever I copy a book into
It then logs that it successfully removes from
It does delete from |
@JoBilert @sjduggan5 do either of you happen to be running anything else that might also be using the |
Not that I'm aware of. Is there a good way to programmatically check? |
@sjduggan5 try using |
I get a bunch of warnings about running
After which it just spits out that python is using it:
|
Same output for me |
Have either of you tried killing the process and seeing if the issue remains? |
I wonder if this comment can help to further investigate the issue. I too am facing the same issue, and it only occurs when the mount is a network mount. https://www.mobileread.com/forums/showpost.php?p=2231723&postcount=2 |
Sorry for the delayed response - I tried killing the process and the issue still remains. Though the issue is definitely what @Microices said as the mount is a network mount (I'm sharing a ZFS pool via Samba). |
Found a likely workaround, https://stackoverflow.com/questions/17303076/sqlite-cannot-open-network-file-programmatically-even-though-worked-before but still unsure if network drive is the root cause. |
Another setting that might be helpful for this scenario. |
@Microices so did changing the journal mode of the DB fix the issue for you? |
No I have not tried it... |
I have a mounted share on a Synology, and have run into this problem several times with trying to host various services. SQLite really doesn't like shares, and I've tried many different options (NFS in a couple different settings, the journal mode being set to delete, using the IDs of the Synology share owner or the ones that are on the host, and probably some other things I'm forgetting.) The only solution I've come to is trying to run this off of my usual host machine and then backing it up via rclone to my Synology. Books don't take up a ton of space, I just need to figure out how to get everything involved set up. I'm pretty new to self hosting and don't have any other ideas, but thought I would throw this out there in case it helps someone. I wanted to make this work on a mounted share but even setting the config to being on the host machine and the ingest and library being on the Synology throws permission errors as I kinda expected. EDIT: After playing around with the install, I managed to get it working off of the setup I normally have. I don't really know how, but if anyone wants my docker compose, and steps, I'd be happy to share. |
Hello, I have installed CWA last week and followed your guide to the letter.
CWA started up fine and my existing library was showing up nicely.
I always get "database locked" errors.
The text was updated successfully, but these errors were encountered: