mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-02-05 00:29:40 +03:00
Server crash if an entry redirecting to a large file exists #531
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 @aschereT on GitHub (Dec 19, 2019).
Subject of the issue
Bitwarden server crashing when opening the Web Vault. The server's
MEMusage would quickly skyrocket to several gigabytes, causing the server to run out of memory and crash.I suspected one of my login items was causing this. I managed to narrow it down to a login with the url
http://code.runnable.com, which redirects to a 1GB file. top in the container shows all the threads trying to download at the same time?Let me know if there's anything else needed, or if something I forgot to add/was wrong!
Your environment
Server has CPU: Pentium G3258 and 7GB of RAM. Ubuntu Server 19.10.
Steps to reproduce
docker statsdocker exec -it bitwarden sh, then run topdocker kill bitwardenhttp://code.runnable.comas the URLMEMusage rocket to the moonExpected behaviour
Bitwarden uses
MEMresponsibly, and not try to download a 1GB file to memory with all of its threads.Actual behaviour
Bitwarden takes over all the
MEMand kills the serverRelevant logs
@dani-garcia commented on GitHub (Dec 19, 2019):
Very interesting case! I never expected a URL to point to a huge file like that. I limited it now to 512 KB which should be more than enough to download any HTML page. (
2545469713)The images are being built now, and should be all finished by tomorrow. Thanks!