bitwarden / self-host

Bitwarden's self-hosted release repository
GNU General Public License v3.0
307 stars 54 forks source link

Memory leak #233

Open Aviator7595 opened 3 months ago

Aviator7595 commented 3 months ago

I am setting up a BW server and before using it I noticed that it is consuming more and more memory after each day depsite the fact that the db was empty (no passwords or whatever) and the server was not used by anyone, not even to connect to the portal. I decided to run a test for over 24h and below are the results. With htop, I noticed that Dotnet DLLs were loaded 19 times each! (which does not seem normal). these dlls are: Api.dll, Identity.dll, admin.dll, notification.dll, Icons.dll). Between the beginning of the test and the end, their memory consumption increased by more than 2% of total memory consumption (plus 2% for each dotnet dll which are a total of 19 * 5= 95) My config: Unified Beta Server Installed 2024.3.0 DB: sqlite Certificate generated wiht let's encrypt (so no proxy used) SMTP configured

Total of memory consumed according to docker stats: at 13:34 -> 329M (just started the server) at 13:35 -> 402M at 13:38 -> 414.8M at 13:53 -> 422.3M at 13:53 -> 444.2 (I loaded the login page on chrome without loging in and close the web page right away) at 14:08 -> 521.5M at 14:24 -> 531.4M at 14:39 -> 533.5M at 14:55 -> 534.7M at 15:27 -> 541.6M at 22:41 -> 712.5M at 10:15 -> 753M at 17:47 -> 788M

Again, the server is not doing anything (just loaded the login page once and that's it) Here is my htop filtered on dotnet at 13:35 (shortly after starting the server)

image
Greenderella commented 3 months ago

Hi there,

I am unable to reproduce this issue, it has been escalated for further investigation. If you have more information that can help us, please add it below.

Thanks!

Aviator7595 commented 3 months ago

Hi @Greenderella

Thanks for your message and for trying to reproduce. Maybe a couple of additional info which may help:

Btw, do you also have Dotnet Dlls loaded 19 times each? Is-it normal?

Thank you!