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

Not StandardError exception during error reporting #412

Closed
sharshenov opened this issue Oct 29, 2019 · 0 comments · Fixed by #441
Closed

Not StandardError exception during error reporting #412

sharshenov opened this issue Oct 29, 2019 · 0 comments · Fixed by #441

Comments

@sharshenov
Copy link
Contributor

Hello, I've found a bug that makes Sneakers not to report acknowledge state on error.

Wiki suggests to pass context_hash to error notification agents. link

Sneakers.error_reporters << proc { |exception, _worker, context_hash| Honeybadger.notify(exception, context_hash) }

I'm using Sentry raven for error notifications. Sometimes it fails to serialize context_hash to json because Bunny::Channel instance in delivery_info of context_hash causes

SystemStackError: stack level too deep

As result:

  1. RabbitMQ keeps message as Unacked
  2. Such messages number may reach number of prefetched messages for worker
  3. Worker hangs without performing any workload

Sneakers handles only StandardError and its descendants here and can not handle SystemStackError because it is not a StandardError.

Previously I fixed similar bug in another place. And I would be happy to do the same here.

But I think that it would be better to rescue from Exception in both places and re-raise exception in case of Interrupt, NoMemoryError and other exceptions that should not be swallowed.

WDYT?

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 a pull request may close this issue.

1 participant