[GH-ISSUE #4293] Slow performance #39082

Closed
opened 2026-07-17 10:32:04 -05:00 by GiteaMirror · 12 comments
Owner

Originally created by @4erf on GitHub (Jan 31, 2024).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/4293

Subject of the issue

Vaultwarden server is quite slow. Saving when using Chrome extension can take up to 10 seconds. Website takes long to load and when it loads it only displays the following:

image

Deployment environment

  • vaultwarden version: vaultwarden 1.30.1
  • Install method: Docker image

  • Clients used: web vault, Chrome extension, Android.

  • Reverse proxy and version: nginx/1.21.6

  • MySQL/MariaDB or PostgreSQL version: SQLite

  • Other relevant details: Served with Cloudflare on custom subdomain. System is quite capable, Ryzen 9, plenty of RAM.

Steps to reproduce

Nothing different from default, just docker image with exposed port 80 and mounted volume on /data.

Expected behaviour

It should be more responsive.

Actual behaviour

It started to be slow and unresponsive suddenly, I didn't update the docker image or change anything, it just suddenly started to become slow. Then I did an update of the docker image, still same issue. Finally, I backed up the db as json, deleted all data, started a fresh vault and imported my data back in, the issue persists.

I believe the issue lays in my data, I must've added some entry in the database that is causing this slowdown, as it started to happen without any change other than new entries to the db. Also, when I started a fresh vault it was fast, until I did the import.

My data is not big, the json was only ~150kb, I have around 170 entries, no attachments or anything fancy, I just use basic fields, custom fields and notes.

Sadly I don't remember exactly when it started to slow down, so I have no clue of which entry I added that caused this, I can do some troubleshooting (deleting recent entries until it works) if it's needed.

Troubleshooting data

I believe only troubleshooting data I can provide is a redacted version of my json that still fails. But it would require some time to build, let me know if it's a must to provide it. Or if you guys have a script that can automatically redact everything, would be great.

Originally created by @4erf on GitHub (Jan 31, 2024). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/4293 <!-- # ### NOTE: Please update to the latest version of vaultwarden before reporting an issue! This saves you and us a lot of time and troubleshooting. See: * https://github.com/dani-garcia/vaultwarden/issues/1180 * https://github.com/dani-garcia/vaultwarden/wiki/Updating-the-vaultwarden-image # ### --> <!-- Please fill out the following template to make solving your problem easier and faster for us. This is only a guideline. If you think that parts are unnecessary for your issue, feel free to remove them. Remember to hide/redact personal or confidential information, such as passwords, IP addresses, and DNS names as appropriate. --> ### Subject of the issue <!-- Describe your issue here. --> Vaultwarden server is quite slow. Saving when using Chrome extension can take up to 10 seconds. Website takes long to load and when it loads it only displays the following: ![image](https://github.com/dani-garcia/vaultwarden/assets/43388082/a84de997-976f-4b77-b27d-0e2157703192) ### Deployment environment <!-- ========================================================================================= Preferably, use the `Generate Support String` button on the admin page's Diagnostics tab. That will auto-generate most of the info requested in this section. ========================================================================================= --> <!-- The version number, obtained from the logs (at startup) or the admin diagnostics page --> <!-- This is NOT the version number shown on the web vault, which is versioned separately from vaultwarden --> <!-- Remember to check if your issue exists on the latest version first! --> * vaultwarden version: vaultwarden 1.30.1 <!-- How the server was installed: Docker image, OS package, built from source, etc. --> * Install method: Docker image * Clients used: web vault, Chrome extension, Android.<!-- web vault, desktop, Android, iOS, etc. (if applicable) --> * Reverse proxy and version: nginx/1.21.6 <!-- if applicable --> * MySQL/MariaDB or PostgreSQL version: SQLite<!-- if applicable --> * Other relevant details: Served with Cloudflare on custom subdomain. System is quite capable, Ryzen 9, plenty of RAM. ### Steps to reproduce <!-- Tell us how to reproduce this issue. What parameters did you set (differently from the defaults) and how did you start vaultwarden? --> Nothing different from default, just docker image with exposed port 80 and mounted volume on `/data`. ### Expected behaviour <!-- Tell us what you expected to happen --> It should be more responsive. ### Actual behaviour <!-- Tell us what actually happened --> It started to be slow and unresponsive suddenly, I didn't update the docker image or change anything, it just suddenly started to become slow. Then I did an update of the docker image, still same issue. Finally, I backed up the db as json, deleted all data, started a fresh vault and imported my data back in, the issue persists. I believe the issue lays in my data, I must've added some entry in the database that is causing this slowdown, as it started to happen without any change other than new entries to the db. Also, when I started a fresh vault it was fast, until I did the import. My data is not big, the json was only ~150kb, I have around 170 entries, no attachments or anything fancy, I just use basic fields, custom fields and notes. Sadly I don't remember exactly when it started to slow down, so I have no clue of which entry I added that caused this, I can do some troubleshooting (deleting recent entries until it works) if it's needed. ### Troubleshooting data <!-- Share any log files, screenshots, or other relevant troubleshooting data --> I believe only troubleshooting data I can provide is a redacted version of my json that still fails. But it would require some time to build, let me know if it's a must to provide it. Or if you guys have a script that can automatically redact everything, would be great.
Author
Owner

@BlackDex commented on GitHub (Jan 31, 2024):

Looks more like a reverse proxy issue.
Any logs of Vaultwarden which state anything?

This is not enough info to do anything.

<!-- gh-comment-id:1918843767 --> @BlackDex commented on GitHub (Jan 31, 2024): Looks more like a reverse proxy issue. Any logs of Vaultwarden which state anything? This is not enough info to do anything.
Author
Owner

@bibicadotnet commented on GitHub (Jan 31, 2024):

The only thing that causes slow loading in the client as far as I know is related to the Encryption key settings

2024-01-31_17-39-30

Check to see if you're keeping these numbers too high

<!-- gh-comment-id:1918847623 --> @bibicadotnet commented on GitHub (Jan 31, 2024): The only thing that causes slow loading in the client as far as I know is related to the Encryption key settings ![2024-01-31_17-39-30](https://github.com/dani-garcia/vaultwarden/assets/119997727/74ea803d-f308-464c-a457-35052066b4dd) Check to see if you're keeping these numbers too high
Author
Owner

@4erf commented on GitHub (Jan 31, 2024):

Hi, @BlackDex, thanks for the insight, I think you found the source of the issue,

In terms of logs there was nothing useful, only icon fetching logs.

However, regarding reverse proxy, I restarted nginx and the problem just went away... But, I know is only a matter of hours/days until it starts failing again, the same happened when I did the fresh install, worked for around a day but then stopped working, I believed it was my data the issue, but turns out it was this.

It's interesting because no other service under my nginx is failing like this. Do you know how can I debug this further?

I will wait until it fails again and report any information that you recommend me to take.

<!-- gh-comment-id:1918887915 --> @4erf commented on GitHub (Jan 31, 2024): Hi, @BlackDex, thanks for the insight, I think you found the source of the issue, In terms of logs there was nothing useful, only icon fetching logs. However, regarding reverse proxy, I restarted nginx and the problem just went away... But, I know is only a matter of hours/days until it starts failing again, the same happened when I did the fresh install, worked for around a day but then stopped working, I believed it was my data the issue, but turns out it was this. It's interesting because no other service under my nginx is failing like this. Do you know how can I debug this further? I will wait until it fails again and report any information that you recommend me to take.
Author
Owner

@4erf commented on GitHub (Jan 31, 2024):

Well, it didn't really take long, it's already slow again. If you have any debug ideas let me know.

<!-- gh-comment-id:1918894991 --> @4erf commented on GitHub (Jan 31, 2024): Well, it didn't really take long, it's already slow again. If you have any debug ideas let me know.
Author
Owner

@BlackDex commented on GitHub (Jan 31, 2024):

Check your nginx logs.
Validate the config against the wiki proxy examples.

<!-- gh-comment-id:1918903038 --> @BlackDex commented on GitHub (Jan 31, 2024): Check your nginx logs. Validate the config against the wiki proxy examples.
Author
Owner

@4erf commented on GitHub (Jan 31, 2024):

I found root cause.

I noticed that whenever the page took long to load nginx logs wouldn't show any incoming request. Turns out the issue is between Cloudflare and my network and the white page with vaultwarden logo was just Cloudflare caching.

I will begin debugging my side, this is not a vaultwarden's issue, sorry for any inconvenience.

Thanks @BlackDex for such quick help, highly appreciate it!

<!-- gh-comment-id:1918947914 --> @4erf commented on GitHub (Jan 31, 2024): I found root cause. I noticed that whenever the page took long to load nginx logs wouldn't show any incoming request. Turns out the issue is between Cloudflare and my network and the white page with vaultwarden logo was just Cloudflare caching. I will begin debugging my side, this is not a vaultwarden's issue, sorry for any inconvenience. Thanks @BlackDex for such quick help, highly appreciate it!
Author
Owner

@Hammerhand17 commented on GitHub (Jul 11, 2024):

I found root cause.

I noticed that whenever the page took long to load nginx logs wouldn't show any incoming request. Turns out the issue is between Cloudflare and my network and the white page with vaultwarden logo was just Cloudflare caching.

I will begin debugging my side, this is not a vaultwarden's issue, sorry for any inconvenience.

Thanks @BlackDex for such quick help, highly appreciate it!

Did you finally get to solve the issue? I`'m suffering the same and don't know how to solve it.

<!-- gh-comment-id:2223323349 --> @Hammerhand17 commented on GitHub (Jul 11, 2024): > I found root cause. > > I noticed that whenever the page took long to load nginx logs wouldn't show any incoming request. Turns out the issue is between Cloudflare and my network and the white page with vaultwarden logo was just Cloudflare caching. > > I will begin debugging my side, this is not a vaultwarden's issue, sorry for any inconvenience. > > Thanks @BlackDex for such quick help, highly appreciate it! Did you finally get to solve the issue? I`'m suffering the same and don't know how to solve it.
Author
Owner

@sirterric commented on GitHub (Aug 10, 2024):

I was having the same issue, and after changing the KDF algorithm to Argon2id (I was using PBKDF2-SHA-256), everything works faster again. I will do some test but right now is working fine.
My vaultwarden is on docker under linux, and I'm using Cloudflare Tunnels.

<!-- gh-comment-id:2279389327 --> @sirterric commented on GitHub (Aug 10, 2024): I was having the same issue, and after changing the KDF algorithm to Argon2id (I was using PBKDF2-SHA-256), everything works faster again. I will do some test but right now is working fine. My vaultwarden is on docker under linux, and I'm using Cloudflare Tunnels.
Author
Owner

@Joly0 commented on GitHub (Jun 10, 2026):

He,y dont want piggy back this issue, but is it possible to set the algorithm to Argon2id for all new users (or existing ones even)?

<!-- gh-comment-id:4668201246 --> @Joly0 commented on GitHub (Jun 10, 2026): He,y dont want piggy back this issue, but is it possible to set the algorithm to Argon2id for all new users (or existing ones even)?
Author
Owner

@stefan0xC commented on GitHub (Jun 10, 2026):

He,y dont want piggy back this issue, but is it possible to set the algorithm to Argon2id for all new users (or existing ones even)?

Why do you do it then? When there has been a recent discussion about this #6984 and also a relevant PR still open #6983

<!-- gh-comment-id:4668306136 --> @stefan0xC commented on GitHub (Jun 10, 2026): > He,y dont want piggy back this issue, but is it possible to set the algorithm to Argon2id for all new users (or existing ones even)? Why do you do it then? When there has been a recent discussion about this #6984 and also a relevant PR still open #6983
Author
Owner

@Joly0 commented on GitHub (Jun 10, 2026):

He,y dont want piggy back this issue, but is it possible to set the algorithm to Argon2id for all new users (or existing ones even)?

Why do you do it then? When there has been a recent discussion about this #6984 and also a relevant PR still open #6983

Couldnt find either the discussion nor the PR when i searched for them, but may be because i searched for things like "algorithm" and not "kdf"

<!-- gh-comment-id:4668365605 --> @Joly0 commented on GitHub (Jun 10, 2026): > > He,y dont want piggy back this issue, but is it possible to set the algorithm to Argon2id for all new users (or existing ones even)? > > Why do you do it then? When there has been a recent discussion about this [#6984](https://github.com/dani-garcia/vaultwarden/discussions/6984) and also a relevant PR still open [#6983](https://github.com/dani-garcia/vaultwarden/pull/6983) Couldnt find either the discussion nor the PR when i searched for them, but may be because i searched for things like "algorithm" and not "kdf"
Author
Owner

@stefan0xC commented on GitHub (Jun 10, 2026):

You could have also searched for argon2id or open a new discussion instead of necrobumping a closed issue.

<!-- gh-comment-id:4668408661 --> @stefan0xC commented on GitHub (Jun 10, 2026): You could have also searched for `argon2id` or open a new discussion instead of necrobumping a closed issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#39082