Warehouse: How do we get Sentry to ignore uWSGI's OSError?

Created on 11 Sep 2015  路  7Comments  路  Source: pypa/warehouse

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

Most helpful comment

Another option is to switch on disable-write-exception in uWSGI config.

All 7 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

apogoreliy picture apogoreliy  路  4Comments

mbakke picture mbakke  路  3Comments

zt2 picture zt2  路  4Comments

mahmoud picture mahmoud  路  4Comments

NathanBnm picture NathanBnm  路  3Comments