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

Feature request: Connection error handling #32

Closed
Paxa opened this issue Sep 28, 2017 · 5 comments
Closed

Feature request: Connection error handling #32

Paxa opened this issue Sep 28, 2017 · 5 comments

Comments

@Paxa
Copy link

Paxa commented Sep 28, 2017

Currently racecar will not call error handler when can not connect to kafka (dns error, host not reachable, open connection error, etc...)

Temporary monkey patch:

Racecar::Runner.class_eval do
  alias_method :run_origin, :run

  def run
    run_origin
  rescue Kafka::ConnectionError => error
    config.error_handler.call(error)
    raise error
  end
end
@dasch
Copy link
Contributor

dasch commented Oct 2, 2017

Do you have a monitoring solution set up in addition to your exception tracker? Connection errors are not exceptional in Kafka, so typically you want to use metrics based alerts rather than exception trackers.

@Paxa
Copy link
Author

Paxa commented Oct 2, 2017

Do you have a monitoring solution set up in addition to your exception tracker?

Not yet, still thinking how to make it right. The only option I can think of is detecting if process/container exit with error code too often

Connection errors are not exceptional in Kafka

I got some kafka related errors too, e.g. Kafka::NoPartitionsAssignedError, it can connect to port on remote server, but can not start receiving data

@mensfeld
Copy link

mensfeld commented Oct 2, 2017

@Paxa the no partition error occurs when you have more consumers than partitions in a topic.

@dasch
Copy link
Contributor

dasch commented Oct 3, 2017

I would recommend using e.g. Datadog or Librato with Statsd to track metrics. Connection errors is one metric published by ruby-kafka.

@dasch dasch closed this as completed Oct 16, 2017
@Paxa
Copy link
Author

Paxa commented Oct 16, 2017

@dasch Thank you!

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