mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-07-16 17:02:14 -05:00
Can't run migrations - database is locked #4385
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Settleman on GitHub (Jul 13, 2020).
Hi all,
I'm new to this so bear with me :)
I'm trying to setup Bitwarden RS in Azure but struggling with a few bits.
Just a quick background on what I did before first...
installed with below cmd
az webapp create --resource-group <REDACTED> --plan bitwarden --name <REDACTED> --deployment-container-image-name bitwardenrs/server:latestI managed to create an account but everything resets to default if I restart the webapp because no permanent share was setup so created a share with name data and mount path /data on a storage account.
I had the "Failed to turn on WAL" error and added the ENABLE_DB_WAL key which seemed to fixed it.
I'm now gettng this error:
[ERROR] thread 'main' panicked at 'Can't run migrations: QueryError(DatabaseError(__Unknown, "database is locked"))': src/main.rs:334And have the following keys set:
ADMIN_TOKEN(something), ENABLE_DB_WAL (false), EXTENDED_LOGGING(true), LOG_FILE(/data/bitwarden3.log), LOG_LEVEL(warn), WEBSITES_ENABLE_APP_SERVICE_STORAGE(false)
I can see the files being created in the share, including the db.sqlite3 but it's 0 bytes. In this share I also have the rsa cert files and the log file with content so I suspect it's not permissions.
I'm just starting with docker, bitwarden, webapps and github but I'm an experienced engineer otherwise so bear with me :)
I appreciate any help you can provide.
full log:
@dani-garcia commented on GitHub (Jul 14, 2020):
I assume the directory where the db.sqlite file is located is some kind of network share? Usually in those cases disabling WAL gets it to run, but it's not an option that I recommend, in your case you might be better off using Postgres or MySQL backends if Azure has those options.
@tynor88 commented on GitHub (Jul 15, 2020):
Running on Azure AppService with WAL disabled works.
@Settleman commented on GitHub (Jul 15, 2020):
Do you want to elaborate on this?
How did you set it up?
Cheers
@BlackDex commented on GitHub (Oct 8, 2020):
WAL is a persistent setting which is stored in the sqlite3 file it self. If you want to change afterwards you need to use the sqlite3 cli file.
See here for more info
@BlackDex commented on GitHub (Nov 18, 2020):
Closing this ticket because of inactivity.
Feel free to re-open if the issue isn't resolved using the
testing/masterversion.