Closed svix-nolan closed 2 years ago
Hi @svix-nolan - there was a similar issue recently over at https://github.com/bugsnag/bugsnag-python/issues/300 linked to non-HTTP errors during report delivery. We're going to investigate and look into a fix to improve error handling in these situations.
I see pull request https://github.com/bugsnag/bugsnag-python/pull/303 was created to address #300 (and mask other exceptions for this issue - #301). It's been almost two weeks since it was created, any updates on it?
It would be worthwhile to add retries (maybe just one) to the delivery class to prevent transient errors like we've seen from interfering with exception reporting.
We had a freeze on releases over the holiday period but this is being progressed again now, and https://github.com/bugsnag/bugsnag-python/pull/303 will resolve this when released.
Adding retries would be something we'd need to consider more widely across our supported server and scripting platforms for consistency so I've fed this back to our product team to consider.
Describe the bug
In RequestsDelivery, requests is used to make a call to
sessions.bugsnag.com
here. We are getting occasional ConnectionResetByPeer errors from therequests.post
call when running in our AWS Lambda fn.Although this is not directly a problem with bugsnag, it would be good to have retries to mitigate this. Also errors like this are not gracefully handled (since its not an http error) and escape the thread. See the error message below.
Steps to reproduce
Connection reset by peer errors occur every once in a while in our logs and are difficult to reproduce. What is probably more useful checking/simulating the other error cases from requests (like mock it to throw a ConnectionError).
Environment
Error Messages
Error messages:
``` Exception in thread Thread-16: Traceback (most recent call last): File "/var/task/urllib3/connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "/var/task/urllib3/connectionpool.py", line 445, in _make_request six.raise_from(e, None) File "