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

Need to filter better the inputs? #19

Open
felipekk opened this issue Oct 6, 2015 · 2 comments
Open

Need to filter better the inputs? #19

felipekk opened this issue Oct 6, 2015 · 2 comments

Comments

@felipekk
Copy link

felipekk commented Oct 6, 2015

I have setup a server running dynosaur with NewRelicInputPlugin and every day I get many exceptions like these:

comparison of Fixnum with nil failed
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/inputs/abstract_input_plugin.rb:65:in `each'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/inputs/abstract_input_plugin.rb:65:in `max'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/inputs/abstract_input_plugin.rb:65:in `max_recent_values'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/inputs/abstract_input_plugin.rb:32:in `estimated_resources'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/controllers/abstract_controller_plugin.rb:49:in `block in get_combined_estimate'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/controllers/abstract_controller_plugin.rb:48:in `each'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/controllers/abstract_controller_plugin.rb:48:in `get_combined_estimate'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/controllers/abstract_controller_plugin.rb:74:in `run'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/autoscaler.rb:73:in `block in run_loop'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/autoscaler.rb:72:in `each'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/autoscaler.rb:72:in `run_loop'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/autoscaler.rb:59:in `start'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/bin/dynosaur:24:in `'
/app/vendor/bundle/ruby/2.1.0/bin/dynosaur:23:in `load'
/app/vendor/bundle/ruby/2.1.0/bin/dynosaur:23:in `
comparison of NilClass with 2 failed
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/inputs/abstract_input_plugin.rb:65:in `each'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/inputs/abstract_input_plugin.rb:65:in `max'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/inputs/abstract_input_plugin.rb:65:in `max_recent_values'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/inputs/abstract_input_plugin.rb:32:in `estimated_resources'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/controllers/abstract_controller_plugin.rb:49:in `block in get_combined_estimate'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/controllers/abstract_controller_plugin.rb:48:in `each'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/controllers/abstract_controller_plugin.rb:48:in `get_combined_estimate'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/controllers/abstract_controller_plugin.rb:74:in `run'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/autoscaler.rb:73:in `block in run_loop'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/autoscaler.rb:72:in `each'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/autoscaler.rb:72:in `run_loop'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/autoscaler.rb:59:in `start'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/bin/dynosaur:24:in `'
/app/vendor/bundle/ruby/2.1.0/bin/dynosaur:23:in `load'
/app/vendor/bundle/ruby/2.1.0/bin/dynosaur:23:in `
@werkshy
Copy link
Contributor

werkshy commented Oct 6, 2015

We're seeing similar issues with mild flakiness in the API causing lots of exceptions. I just released the https://github.com/harrystech/dynosaur#bugsnag error handler to at least fix the '200 emails from dynosaur' issue. @felipekk that might help you in the short term.

I think what we really need here is a way to silently ignore API failures for a short time, then raise an exception (or whatever) when the outage goes on too long. I don't have a clear idea yet how to do that cleanly.

@felipekk
Copy link
Author

felipekk commented Oct 6, 2015

@werkshy I would store the datetime of the last "clean" result from the API in a variable, and raise an exception when that is older than X minutes.

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

2 participants