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

Rate limited response error causes infinite loop #352

Closed
jborichevskiy opened this issue Mar 26, 2021 · 9 comments · Fixed by #370
Closed

Rate limited response error causes infinite loop #352

jborichevskiy opened this issue Mar 26, 2021 · 9 comments · Fixed by #370
Assignees

Comments

@jborichevskiy
Copy link

jborichevskiy commented Mar 26, 2021

I am seeing an infinite notification loop happen when hitting any exception reported by Honeybadger while having exceeded our account rate limit.

Upon reporting, the first response is [warn] [Honeybadger] API failure: "{\"error\":\"Rate Limit Exceeded\"}. It looks like this failure is then being caught at client.ex:162, but then Logger.error is called - sending this new notification and continuing the loop. This continues until the server is restarted.

Proposed fixes

Switching the calls from Logger.error to Logger.warn stops the loop from starting. I'm happy to submit a PR with this but I'm not sure this is the ideal fix for everyone.

An alternative might be to use @sezaru's exclude_error config option PR #342 but it would need to be merged in first.

Open to other solutions or ideas here! Thanks.

Version info

Using honeybadger 0.16.0.

Reproduced on multiple systems (Elixir 1.11.0-dev (82dca55) (compiled with Erlang/OTP 23) on MacOS 10.15.7) and (elixir 1.10.2 / Erlang 22.2 on Ubuntu 18.04.5 LTS).

Front logo Front conversations

@joshuap
Copy link
Member

joshuap commented Mar 29, 2021

@jborichevskiy sorry for the trouble, and thanks for the offer to help! Email [email protected] if you need us to temporarily increase your monthly error quota as a result of this.

@sorentwo what solution do you like best?

@sorentwo
Copy link
Collaborator

@joshuap I think we should use Logger.warn for this in the immediate term.

@joshuap
Copy link
Member

joshuap commented Mar 29, 2021

I think we should use Logger.warn for this in the immediate term.

Sounds good, thanks! @jborichevskiy would you like to submit that PR?

@jborichevskiy
Copy link
Author

I think we should use Logger.warn for this in the immediate term.

Sounds good, thanks! @jborichevskiy would you like to submit that PR?

Sure thing - will do in a few!

@jborichevskiy
Copy link
Author

@joshuap I made an oops - it is already Logger.warn; I must've lost track of my local changes when submitting the issue; sorry for the confusion.

Logger.info also seems to be triggering the loop. I'll dig around some more and follow up!

@zmagajna
Copy link

Hi, any update on that? Having the same issue with this.

@jborichevskiy
Copy link
Author

Hi, any update on that? Having the same issue with this.

Apologies - been sidetracked with some other work. Haven't figured out a fix here yet but will update when I do.

@joshuap
Copy link
Member

joshuap commented Jun 18, 2021

We had another user report something similar—they received thousands of "Honeybadger rate limit exceeded" errors.

I'm looking to get this wrapped up in a few weeks.

@joshuap
Copy link
Member

joshuap commented Jun 18, 2021

From @rabidpraxis:

We could add a :honeybadger domain to each internal logger call and then include that domain to the list of ignored ones https://github.com/honeybadger-io/honeybadger-elixir/blob/master/test/honeybadger/logger_test.exs#L156-L163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants