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

Avoid FD spike after retrying KafkaAdminClient #186

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

orange-kao
Copy link

A caller might call kafka.KafkaAdminClient repeatedly and handle kafka.errors.NoBrokersAvailable if the broker is not available.

However, each retry will cause 3 extra FD being used. Depends on how long the caller wait before retry, the FD usage can reach 300~700 before Python garbage collector collecting those FD.

This commit close those FD early.

@orange-kao
Copy link
Author

Test test/test_consumer_group.py::test_group failed, same test also failed on master branch. Currently I don't know why...

A caller might call kafka.KafkaAdminClient repeatedly and handle
kafka.errors.NoBrokersAvailable if the broker is not available.

However, each retry will cause 3 extra FD being used. Depends on how
long the caller wait before retry, the FD usage can reach 300~700 before
Python garbage collector collecting those FD.

This commit close those FD early.
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.

2 participants