Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix circular references in KafkaMetrics #1340

Closed
dpkp opened this issue Jan 11, 2018 · 1 comment
Closed

Fix circular references in KafkaMetrics #1340

dpkp opened this issue Jan 11, 2018 · 1 comment

Comments

@dpkp
Copy link
Owner

dpkp commented Jan 11, 2018

It looks like there are several circular references within the metrics implementation. These prevent garbage collection when the consumer or producer object completes. These should be updated to use weakrefs where possible.

@kishorenc
Copy link
Contributor

@dpkp We're witnessing memory leaks in KafkaProducer via these KafkaMetric objects. We periodically close the producer object and re-create the producer, and when we do that the garbage collector does not seem to free these metric objects: we were able to verify that with a memory dump. When we don't reuse the producer object without re-initializing it, we see no leaks.

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

No branches or pull requests

2 participants