honeybadger-io / honeybadger-python

Send Python and Django errors to Honeybadger.
https://www.honeybadger.io/
MIT License
15 stars 25 forks source link

Errors not reported inside a Docker container #83

Closed joshuap closed 3 years ago

joshuap commented 3 years ago

I'm creating this issue to track an internal bug report. See this sample project for instructions/how to reproduce:

https://bitbucket.org/minute_exer/test-hb-flask/src/master/

Kelvin4664 commented 3 years ago

Found the issue to be the uwsgi configuration used in the base docker image (tiangolo/uwsgi-nginx:python3.8-alpine) implicitly disables threading when uwsgi is used to serve the application, hence the reason it works outside the image. Solution is to either set "HONEYBADGER_FORCE_SYNC" in configuration to True, This will prevent reporting errors in separate threads, or explicitly enable threads for uwsgi by modifying the entrypoint: https://github.com/tiangolo/uwsgi-nginx-flask-docker/issues/71