[GH-ISSUE #383] Error saving cipher #222

Closed
opened 2026-03-03 01:26:53 +03:00 by kerem · 7 comments
Owner

Originally created by @romain1206 on GitHub (Feb 4, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/383

[2019-02-04 22:45:47][bitwarden_rs::db::models::user][WARN] Failed to update revision for xxxxxxxx@xxxx.fr
[2019-02-04 22:45:47][bitwarden_rs::error][ERROR] Error saving cipher.
[CAUSE] DatabaseError(
__Unknown,
"database is locked"
)

Originally created by @romain1206 on GitHub (Feb 4, 2019). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/383 [2019-02-04 22:45:47][bitwarden_rs::db::models::user][WARN] Failed to update revision for xxxxxxxx@xxxx.fr [2019-02-04 22:45:47][bitwarden_rs::error][ERROR] Error saving cipher. [CAUSE] DatabaseError( __Unknown, "database is locked" )
kerem closed this issue 2026-03-03 01:26:53 +03:00
Author
Owner

@dani-garcia commented on GitHub (Feb 4, 2019):

Can you give us some steps to reproduce the error?

<!-- gh-comment-id:460461295 --> @dani-garcia commented on GitHub (Feb 4, 2019): Can you give us some steps to reproduce the error?
Author
Owner

@romain1206 commented on GitHub (Feb 5, 2019):

hello,

i have this error when i want move 300 login to another folder.

<!-- gh-comment-id:460547501 --> @romain1206 commented on GitHub (Feb 5, 2019): hello, i have this error when i want move 300 login to another folder.
Author
Owner

@mprasil commented on GitHub (Feb 5, 2019):

We do a bunch of updates there in the DB and we also trigger a bunch of update_revision calls (one for each move), maybe we should only trigger one at the end of the operation.

<!-- gh-comment-id:460603088 --> @mprasil commented on GitHub (Feb 5, 2019): We do a bunch of updates there in the DB and we also trigger a bunch of update_revision calls (one for each move), maybe we should only trigger one at the end of the operation.
Author
Owner

@mprasil commented on GitHub (Feb 5, 2019):

I was thinking that maybe we could defer the revision update and try to compact multiple revision updates into one, but some of the vault functionality actually relies on revision being updated instantly.

I think we can attempt to retry when updating the revision rather than failing straight away. I'll try to implement that.

<!-- gh-comment-id:460606695 --> @mprasil commented on GitHub (Feb 5, 2019): I was thinking that maybe we could defer the revision update and try to compact multiple revision updates into one, but some of the vault functionality actually relies on revision being updated instantly. I think we can attempt to retry when updating the revision rather than failing straight away. I'll try to implement that.
Author
Owner

@mprasil commented on GitHub (Feb 5, 2019):

Okay, I've created a PR, that should hopefully fix this. The revision update should now retry 10 times instead of failing instantly. (similar to attachment updates) I've tried to move about 500 items (as much as Vault let me) and it seems to handle that fine.

<!-- gh-comment-id:460611507 --> @mprasil commented on GitHub (Feb 5, 2019): Okay, I've created a PR, that should hopefully fix this. The revision update should now retry 10 times instead of failing instantly. (similar to attachment updates) I've tried to move about 500 items (as much as Vault let me) and it seems to handle that fine.
Author
Owner

@dani-garcia commented on GitHub (Feb 5, 2019):

This hopefully has been fixed with the latest PR. We'll have to wait an hour or so until the docker images are built.

<!-- gh-comment-id:460662360 --> @dani-garcia commented on GitHub (Feb 5, 2019): This hopefully has been fixed with the latest PR. We'll have to wait an hour or so until the docker images are built.
Author
Owner

@suricloud commented on GitHub (Mar 18, 2021):

Hi,just installed,and getting this same error?

<!-- gh-comment-id:801994079 --> @suricloud commented on GitHub (Mar 18, 2021): Hi,just installed,and getting this same error?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#222
No description provided.