majorsl 23 Posted November 9, 2024 Posted November 9, 2024 For awhile now, I've had my Emby on my Synology NAS with Docker. I recently got a new mini PC that is quite a bit more powerful so I wanted to use it for hardware transcoding. The new mini PC is running Debian and I have Emby in Docker on it. I made a copy of my entire configuration on the NAS and shared it (just to be safe in case I had to go back, thank goodness). I figured the redundancy of the NAS would be good for this still. It "works" but it seems the database is locked for writing: SQLitePCL.pretty.SQLiteException: Busy: database is locked I know this is a permissions problem, somewhere, but I'll be danged if I can figure it out. I can both read and write files to that shared config space from the mini PC just fine. My Docker container for Emby has the same UID/GID as that user (1000 for both). If I move aside "library.db", Emby will recreate it on that share, but at 0 bytes and complain about the database again. It seems it can create a file, but not write into it?
majorsl 23 Posted November 9, 2024 Author Posted November 9, 2024 UPDATE: it appears it is just the database files having the issues. If I try to set Emby up from scratch, the other types of files are generated (.xml, logs, etc.) so the share is writable in all ways - it just appears SQL is having issues with the location and continues to throw that error while creating empty databases - that are created, just 0 bytes.
Solution Q-Droid 989 Posted November 10, 2024 Solution Posted November 10, 2024 Are you running Emby on the NUC using config files and databases on a network share? If so this is not a good practice. SQLite is not reliable on network storage and even more problematic if using CIFS/SMB. You are likely to also run into performance problems as the network storage becomes an I/O bottleneck for operations that should be local and preferably on SSD. DB queries and updates, cache creation and retrieval: operations that in turn affect scanning, seeking and UI response. 1
majorsl 23 Posted November 10, 2024 Author Posted November 10, 2024 (edited) 1 hour ago, Q-Droid said: Are you running Emby on the NUC using config files and databases on a network share? If so this is not a good practice. SQLite is not reliable on network storage and even more problematic if using CIFS/SMB. You are likely to also run into performance problems as the network storage becomes an I/O bottleneck for operations that should be local and preferably on SSD. DB queries and updates, cache creation and retrieval: operations that in turn affect scanning, seeking and UI response. Well, that was the goal, but given it isn't good practice, I think I'll abandon that. I'll probably switch ideas and run the config and db from the new host and set Emby's Backup directory (I have Premiere) to save to the NAS instead. I assume the backups are copies and not directly dumped by SQL and I'd just hit the same wall saving to the NAS? Guess I'll find out! Edited November 10, 2024 by majorsl
Q-Droid 989 Posted November 10, 2024 Posted November 10, 2024 1 hour ago, majorsl said: I assume the backups are copies and not directly dumped by SQL and I'd just hit the same wall saving to the NAS? Guess I'll find out! That's a good question and frankly I don't know how the DB backups are created. Even if it uses DB dumps via sqlite you can mount the shares using options that will work for remote access to a DB and for the purposes of a backup it should be fine. It's for typical runtime use that network storage should be avoided for these DBs. And for others who might ask, this isn't just my opinion on this: https://www.sqlite.org/useovernet.html
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now