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 leaks in this exporter #193

Open
akamensky opened this issue Dec 9, 2020 · 5 comments
Open

Memory leaks in this exporter #193

akamensky opened this issue Dec 9, 2020 · 5 comments

Comments

@akamensky
Copy link

Not sure under what conditions, but this exporter leaks memory like hell even causing OOM when not caught on time:

[Dec 8 09:56] kafka_exporter invoked oom-killer: gfp_mask=0x200da, order=0, oom_score_adj=0
[  +0.000009] kafka_exporter cpuset=/ mems_allowed=0
@vin01
Copy link

vin01 commented Dec 21, 2020

I encountered the same and looks like it happens when connection failures occur either when connection failures occur (timeouts due to firewall / unresponsive broker under heavy load)

I think it is an upstream issue, I raised an issue in Sarama to discuss this further: IBM/sarama#1857

@atrbgithub
Copy link

@vin01 this may be related #54

@atrbgithub
Copy link

We see memory gradually rising over the course of 6 days or so (9mb usage to 36mb for example), and then suddenly it will shoot up to say 150mb at which point it is restarted.

Over the course of the whole period, I only seen one instance of kafka: broker not connected so not sure if it is related to the Sarama issue, unless you don't see the connection problem written to the logs when it occurs.

@akamensky
Copy link
Author

In out case the connection timeout happens between prometheus scraper and this exporter. Exporter itself can scrape metrics from Kafka, but getting the page over HTTP takes a very long time. Server is quite busy with load avg staying pretty high up. We don't see the same issue on servers that are not loaded.

So I don't think it is related to Sarama at all.

@vin01
Copy link

vin01 commented Dec 21, 2020

Any relevant logs from the exporter @akamensky ? You can also try enabling log.enable-sarama to get some more logs from sarama in case there is something.

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

3 participants