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

Frequent "OSError" triggered by exception_hook using Honeybadger for Python 0.12.0 #121

Closed
agdiaz opened this issue Oct 11, 2022 · 6 comments
Assignees
Labels

Comments

@agdiaz
Copy link

agdiaz commented Oct 11, 2022

Hello Honeybadger devs,
I hope this message finds you doing well!

I've implemented the error tracking service on a Django website deployed on "Ubuntu 18.04.3 LTS". This application runs by using a uwsgi engine and behind an NGINX server.

Several times a day I received notifications related to an error coming from inside the HoneyBadger library but with an empty stack trace:

image

There are no further details that could help me to identify the issue inside my project's code:
image

Would you mind helping me to identify the root cause of this issue?

Thank you in advance for your feedback and time.

Best from Brussels!
Adrián,

@joshuap
Copy link
Member

joshuap commented Oct 11, 2022

@Kelvin4664 can you look at this one? Could it be a case where the stack trace is being generated internally when calling honeybadger.notify like this example from the README?

honeybadger.notify(error_class='ValueError', error_message='Something bad happened!', fingerprint='custom_fingerprint')

@joshuap joshuap added the bug label Oct 11, 2022
@agdiaz
Copy link
Author

agdiaz commented Oct 12, 2022

Hello there,

Thanks for checking it out! Just to add a bit more context, I'm attaching the frequency chart in order to illustrate that it's happening randomly:

image

I've reviewed the source code of my project, and the two places where I invoke honeybadger.notify add context using a dictionary, so these places don't seem to be related to the OSError because we should see the context at least.

Have a nice day 👋

@Kelvin4664
Copy link
Collaborator

Kelvin4664 commented Oct 14, 2022

Hi @agdiaz
Thank you for the detailed report.
There is little or no detail because the error occurred outside your application. More specifically, at the uwsgi layer which is outside honeybadger's frame.
Such errors usually occur when uwsgi encounters a large request body, or having more requests than there's available workers.
You can turn these notifications off from your uwsgi config by turning on the following:
ignore-sigpipe
ignore-write-errors
disable-write-exception

@joshuap can we consider a dedicated wsgi/uwsgi intergration to help with cases like this?

@joshuap
Copy link
Member

joshuap commented Oct 17, 2022

@joshuap can we consider a dedicated wsgi/uwsgi intergration to help with cases like this?

Yep, could you write up an issue for that feature and give it the "enhancement" label? Thanks!

@agdiaz
Copy link
Author

agdiaz commented Oct 19, 2022

@Kelvin4664 @joshuap: thank you for your help finding the root cause of these OSErrors and for proposing a workaround!

@Kelvin4664
Copy link
Collaborator

Will be addressed with #125

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

No branches or pull requests

3 participants