mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-26 09:46:00 +03:00
[GH-ISSUE #4693] Very slow multiple add/delete operations #1958
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#1958
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 @epiniguin on GitHub (Jul 2, 2024).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/4693
Subject of the issue
I installed Vaultwarden and Bitwarden Unified Beta for testing and comparing.
Both are installed as Docker containers on the same Debian VM(It is 8 cores Intel Xeon with 4GB RAM. So it is not a slow server).
Both vaults use a shared Postgresql installed on the same VM as Docker container.
Both vaults are empty before testing.
Both are behind the same Nginx proxy installed on the router.
I use the web vault, the Firefox official Bitwarden extension and the Android official Bitwarden app.
The clients and the servers are in the same LAN.
For a testing purpose I exported 427 passwords from Firefox to CSV.
I imported and after some pause deleted these items. After that I emptied the recycle bin.
I tried to import from web vaults and a Firefox extension - the results were the same, so I guess it is not a client issue.
Deleting and recycle bin emptying are possible only from the web vaults.
The results are in the table below.
When testing Vaultwarden with enabled push notifications it was difficult to measure the times precise because of web vault 60s timeout errors. Besides, after these timeouts the data in the Vaultwarden web vault stopped to refresh and it needed to renew the page and to unlock the vault.
Deployment environment
Your environment (Generated via diagnostics page)
Config (Generated via diagnostics page)
Show Running Config
Environment settings which are overridden:
Install method: Docker
Clients used:
web vault, firefox extension
Reverse proxy and version:
nginx/1.26.1 installed on the router
MySQL/MariaDB or PostgreSQL version:
PostgreSQL 16.3 (Debian 16.3-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
Steps to reproduce
Expected behaviour
Vaultwarden and Bitwarden should work at approximately the same speed.
Actual behaviour
Vaultwarden is much slower than Bitwarden particularly with enabled push notifications.
Troubleshooting data
@BlackDex commented on GitHub (Jul 2, 2024):
Hmm, i thought we fixed that already in
testingtagged images, but I'm not sure. Because we do not push on import, but we shouldn't do this on bulk delete/trash-clean too. But we should see if we can trigger a refresh or something else for the other clients, not sure if that is possible currently.@BlackDex commented on GitHub (Jul 2, 2024):
Also, there is a similar issue #4669.
The only way i can think of is running the notifications in there own thread, and handle the pushes outside of the web/main threads.
@epiniguin commented on GitHub (Jul 2, 2024):
It is slower without enabled push also.
I guess that 427 items is not a problem at all for Postgresql. That's why Bitwarden deletes them for 3s(with https delays).
@epiniguin commented on GitHub (Jul 2, 2024):
In my case I don't have any delay for single operations. Only for multiple.
@stefan0xC commented on GitHub (Jul 3, 2024):
I can't really reproduce your findings (with the
vaultwarden/server:latestimage and also using postgres 16). With 330 items each operation (in the web-vault) took about 1-1.5 seconds with Vaultwarden.edit: even with 499 items it's 1.7-2 seconds for these requests.
@epiniguin commented on GitHub (Jul 3, 2024):
It's my log.
I don't know what is the difference between our systems.
But as I wrote Bitwarden works fast on the same infrastructure.
What diagnostic could I do?
@BlackDex commented on GitHub (Jul 3, 2024):
Try to enable
LOG_LEVEL=debugand see if that provides more (and enough) details, else set it totracethat should give a lot details.@stefan0xC commented on GitHub (Jul 3, 2024):
Okay, I can only reproduce the issue if I enable push.
@epiniguin commented on GitHub (Jul 3, 2024):
Attached delete logs with enabled push.
delete_with_push.txt
bin_with_push.txt
@epiniguin commented on GitHub (Jul 3, 2024):
This is emptying bin trace with disabled push.
I don't see anything bad, but my timing is 23s, not 1.5s as yours.
bin_wo_push_trace.txt
@gabrielecabrini commented on GitHub (Jun 12, 2025):
I've also noticed the same issue even when deleting single items taking more than 3 seconds each (disabled push)
@BlackDex commented on GitHub (Jun 12, 2025):
If you have push disabled, then it's something totally different. Might even be a database latency, or disk I/O issue.
Try to enable debug logging and see if you find anything useful in the logs.
@BlackDex commented on GitHub (Aug 7, 2025):
Ok, i took a better look the past few days, and we were sending out a push on every delete.
This overloaded both Vaultwarden and the Bitwarden Push servers, and caused the slow-down.
While i think we could still improve upon import and delete of multiple ciphers, the main issues here should be fixed via #6144, and trying to optimize import and delete of multiple items is a different task from my point of view.