sqlite3.OperationalError: database is locked error
See original GitHub issueHi there,
I’m attempting to run this in portainer and getting the following error whenever starting the container:
Outdated jbos table, cleaning up and recreating
Traceback (most recent call last):
File "./youtube-dl-server.py", line 114, in <module>
JobsDB.init_db()
File "/usr/src/app/ydl_server/logdb.py", line 72, in init_db
cursor.execute("CREATE TABLE if not exists jobs \
sqlite3.OperationalError: database is locked
Any ideas?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
OperationalError: database is locked - python - Stack Overflow
OperationalError: database is locked errors indicate that your application is experiencing more concurrency than sqlite can handle in default configuration.
Read more >sqlite3.OperationalError: database is locked - Pyrogram
This error occurs when more than one process is using the same session file, that is, when you run two or more clients...
Read more >How to Fix SQLite Error Database is Locked - Error Code 5
This error code occurs when the user tries to perform two inappropriate operations on a database at the same detail and on the...
Read more >Fix SQLite Database File is Locked Error - Kernel Data Recovery
Normally, the error occurs when two users try to run transactions on the same tables and change the content. SQLite engine finds it...
Read more >Resolve Error and Unlock SQLite Database - ConverterTools
This is an Operational error which indicates that the application is handling more concurrency than the default configuration. it means that one thread...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok, that seems to have worked! This is what I wound up using:
I added in the environment variable because it appears it was defaulting to
/app_config/config.yml
.Thanks again for your help! It’s working perfectly now!
Hi there, sorry to revive a previously closed ticket – I think I’ve figured out why this was causing errors and figured I’d let you know in case you weren’t aware.
I had mounted a volume pointing to my network SMB 2 share which is mounted on ubuntu using cifs. It appears that sqlite does not behave well using NFS mounts, which is why I have been encountering this error.
source: https://sqlite.org/howtocorrupt.html
Is it possible to write the downloads out to a different directory instead of keeping them along side the db files?