Sometimes when the client has already disconnected, uWSGI will log an error like:
Thu Sep 10 02:13:33 2015 - uwsgi_response_write_body_do(): Broken pipe [core/writer.c line 331] during GET /_debug_toolbar/313339393934343438353938333532 (192.168.59.3)
OSError: write error
This will get recorded in Sentry even though there's nothing actionable from our end... So what do we do? Is there some uWSGI setting to get it to stop throwing this error? Can we get sentry or raven to ignore it?
/cc @mattrobenolt
Usually you just acknowledge the error in Sentry and it won't send notifications anymore for this particular error. Ignoring OSError exception might hide other errors.
Maybe @dcramer knows.
To be clear, I've never seen this personally before, so I'm not sure off the top of my head without investigating. :)
I'm guessing it's because we're not buffing requests, so if a connection breaks in the middle of reading it inside our application code it needs to raise an exception so that we don't continue to process the request. What I don't really know is how not to have Sentry care about it since there's zero actionable thing for me to do here, a connection went away, it happens.
Maybe we can convince uWSGI to use a subclass of OSError like ClientLostError or something and then can just filter out that particular exception.
I just noticed the mute button in Sentry which hides this particular exception group. That should probably do what we want here.
Related to getsentry/sentry#1850
Another option is to switch on disable-write-exception in uWSGI config.
Most helpful comment
Another option is to switch on
disable-write-exceptionin uWSGI config.