Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High memory usage with watch-kube-secrets enable #97

Open
twingate-blee opened this issue Jan 5, 2023 · 1 comment
Open

High memory usage with watch-kube-secrets enable #97

twingate-blee opened this issue Jan 5, 2023 · 1 comment

Comments

@twingate-blee
Copy link

We're running certificate-exporter on 4 environments. The memory usage on all other envs are below 50m. For some reason in our dev environment the memory spikes to about 500m when it reads the secrets. I have increased the default max-cache-duration to 20 mins and see the spike now every 20 mins.

In each env we are reading in the same number of certificates

The container image is:
docker.io/enix/x509-certificate-exporter:3.3.0

Args are:

    Args:
      --watch-kube-secrets
      --secret-type=kubernetes.io/tls:tls.crt
      --max-cache-duration=300s
      --listen-address=:9793

Log with cert paths redacted

time="2023-01-05T19:57:30Z" level=info msg="fetching configuration from within the cluster"
time="2023-01-05T19:57:30Z" level=info msg="loaded configuration, API server is at https://10.27.128.1:443"
time="2023-01-05T19:57:30Z" level=info msg="fetching API server version"
time="2023-01-05T19:57:30Z" level=info msg="kubernetes server version is v1.22.15-gke.100"
time="2023-01-05T19:57:30Z" level=info msg="starting x509-certificate-exporter version 3.3.0"
time="2023-01-05T19:57:51Z" level=info msg="3 valid certificate(s) found in \"k8s/*****\""
time="2023-01-05T19:57:51Z" level=info msg="3 valid certificate(s) found in \"k8s/*****\""
time="2023-01-05T19:57:51Z" level=info msg="3 valid certificate(s) found in \"k8s/*****\""
time="2023-01-05T19:57:51Z" level=info msg="3 valid certificate(s) found in \"k8s/*****\""
time="2023-01-05T19:57:51Z" level=info msg="3 valid certificate(s) found in \"k8s/*****\""
time="2023-01-05T19:57:51Z" level=info msg="parsed 15 certificates (0 read failures)"
time="2023-01-05T19:57:51Z" level=info msg="listening on :9793"

High mem in dev
Screenshot 2023-01-05 at 3 55 57 PM

What it typical memory usage looks like in other environments.
Screenshot 2023-01-05 at 3 53 20 PM

Do you know what would be causing the higher memory usage?

@pcecot
Copy link

pcecot commented Nov 16, 2023

I am seeing the same problem with only 4 certificates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants