Skip to content

Conversation

@aw
Copy link
Contributor

@aw aw commented Nov 11, 2025

This PR fixes what I believe to be a serious memory leak in the cloudflare-exporter. On a system scraping a significant amount of metrics with nearly 100 zones, the memory consumption of the exporter gradually increases to the point of exhaustion.

This PR implements a simple fix which clears the accumulated metrics before the next scrape. However it's careful to only clear them for the target zone/account, to ensure unprocessed metrics for a different zone/account aren't lost.

From my tests so far, the results are quite promising as the exporter is much more stable now - not showing an increase in memory consumption beyond what one would consider "normal".

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

Successfully merging this pull request may close these issues.

1 participant