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

memory leak when vcenter not reachable #282

Open
finkr opened this issue Jul 27, 2021 · 4 comments
Open

memory leak when vcenter not reachable #282

finkr opened this issue Jul 27, 2021 · 4 comments

Comments

@finkr
Copy link
Contributor

finkr commented Jul 27, 2021

Thanks to the exporter monitoring feature introduced in #128, I noticed a memory leakage when the exporter can't reach the vCenter. The leaked memory was recovered when the connection resumed (garbage collection).

This occurred when experimenting vmware_exporter with an updated version of the library Prometheus client version 0.11.0.

image

The leakage has to be confirmed with the current version setup (vmware_exporter with client_python 0.0.19).

@RyanW8
Copy link

RyanW8 commented Aug 9, 2021

Screenshot 2021-08-09 at 13 42 10
Can confirm that we see the exact same behaviour, although the vCenter is reachable scraping metrics takes some time. And if it exceeds the scrape timeout this causes the memory to increase

@pryorda
Copy link
Owner

pryorda commented Sep 14, 2021

@RyanW8 What version?

@daverstam
Copy link

I had a lot of issues where the exporter would run into race conditions where scrape_timeout would cause the exporter to timeout however the connections seemed to stay and causing the memory to raise.

However changing the threads for reactor/twisted made it much more stable for our environment. The exporter rarely ever exceeds the scrape_timeout (118s) anymore. I'm running the exporter in k8s if that makes any difference. I changed suggestedThreadPoolSize from 25 to 1 and that actually lowered the scrape duration time.

reactor.suggestThreadPoolSize(1)

Our environment with approx 200 hosts and ~ 2000vm's takes around 30s to scrape (including datastores)

@thuvh
Copy link
Contributor

thuvh commented Jul 22, 2022

@pryorda should we return empty page when vcenter is not reached

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

5 participants