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

[kafka_consumer] add timeout for zk/kafka connections #1592

Merged
merged 1 commit into from
May 6, 2015

Conversation

LeoCavaille
Copy link
Member

Because the default timeouts are pretty high in the kafka-python and
kazoo library (resp. 120s and 10s), we put them at a much lower
threshold (5s) for the default cases and offer a way to override in the
YAML init_config section.

Fixes #1589.

@clutchski
Copy link
Contributor

nice thanks1

init_config.get('zk_timeout', DEFAULT_ZK_TIMEOUT))
self.kafka_timeout = int(
init_config.get('kafka_timeout', DEFAULT_KAFKA_TIMEOUT))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You forgot the AgentCheck.__init__(self, name, init_config, agentConfig, instances=instances).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow good catch! 👍 Pushed a fix.

@degemer
Copy link
Member

degemer commented May 6, 2015

Nice improvement ! 👍
Too bad we don't have any test for it. 😞
I just checked that it fails properly, we will have to really test it with the nightlies.

Because the default timeouts are pretty high in the kafka-python and
kazoo library (resp. 120s and 10s), we put them at a much lower
threshold (5s) for the default cases and offer a way to override in the
YAML init_config section.

Fixes #1589.
@LeoCavaille LeoCavaille merged commit ce85591 into master May 6, 2015
@LeoCavaille LeoCavaille deleted the leo/kafkatimeout branch May 6, 2015 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[kafka_consumer] Kafka client takes 2 minutes to time out
3 participants