Skip to content

Potential memory leak in login logic #65

Description

@skwair

Describe the bug

Hello! I'm using Bitwarden Secrets Manager as a secrets provider for External Secrets Operator, deployed via Helm with:

bitwarden-sdk-server:
  enabled: true

Looking at memory consumption of this pod, it looks like there's a memory leak:

Image

Checking quickly the code, it might be related to the Login function that creates a Bitwarden client, but never closes it.

This function call seems to be wrapped in a middleware, executed on all requests which could explain the leak?

To Reproduce

Steps to reproduce the behavior:

  1. Install ESO with Bitwarden Secrets Manager enabled
  2. Let it run for a while, check memory usage of sdk-server

Expected behavior

Memory usage should be proportional to HTTP traffic, not scale indefinitely.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions