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

uWSGI OSError: write error #264

Closed
jpmckinney opened this issue Apr 26, 2021 · 2 comments
Closed

uWSGI OSError: write error #264

jpmckinney opened this issue Apr 26, 2021 · 2 comments
Labels
services Relating to common services like NTP, Apache, uWSGI, cron, etc.

Comments

@jpmckinney
Copy link
Member

jpmckinney commented Apr 26, 2021

We occasionally see errors reported to Sentry from uWSGI as simply "OSError: write error".

When looking in /var/log/uwsgi/app/ log files, we get more detail:

ocdskit-web.log.2.gz:Sat Apr 24 21:59:57 2021 - SIGPIPE: writing to a closed pipe/socket/fd (probably the client disconnected) on request /mapping-sheet/?source=https://standard.open-contracting.org/profiles/ppp/1.0/en/_static/patched/release-schema.json (ip 54.36.149.67) !!!
ocdskit-web.log.2.gz:Sat Apr 24 21:59:57 2021 - uwsgi_response_write_body_do(): Broken pipe [core/writer.c line 331] during GET /mapping-sheet/?source=https://standard.open-contracting.org/profiles/ppp/1.0/en/_static/patched/release-schema.json (54.36.149.67)
ocdskit-web.log.2.gz:OSError: write error

There are uWSGI options to ignore the errors, which would be fine if the error were caused by a client closing the connection before the response was written. However, it seems the error can also be caused by a timeout, in which case we'd want to change our timeout configuration in Apache and in uWSGI.

For now, this issue just creates noise in Sentry. We're not aware of it affecting a user (viz. timeout potential cause).

There is a lengthy uWSGI issue here: unbit/uwsgi#1623

@jpmckinney jpmckinney added the services Relating to common services like NTP, Apache, uWSGI, cron, etc. label Apr 26, 2021
@devZer0
Copy link

devZer0 commented Jul 27, 2021

i see these errors in zulip django.log from time to time:

Wed Jun  2 05:54:14 2021 - SIGPIPE: writing to a closed pipe/socket/fd (probably the client disconnected) on request /api/v1/users/me/1/topics? (ip 5.147.234.117) !!!
Wed Jun  2 05:54:14 2021 - uwsgi_response_writev_headers_and_body_do(): Broken pipe [core/writer.c line 306] during GET /api/v1/users/me/1/topics? (5.147.234.117)
OSError: write error
Wed Jun  2 05:54:14 2021 - SIGPIPE: writing to a closed pipe/socket/fd (probably the client disconnected) on request /api/v1/users/me/1/topics? (ip 5.147.234.117) !!!
Wed Jun  2 05:54:14 2021 - uwsgi_response_writev_headers_and_body_do(): Broken pipe [core/writer.c line 306] during GET /api/v1/users/me/1/topics? (5.147.234.117)
OSError: write error

@jpmckinney
Copy link
Member Author

Closing as errors occur quite rarely based on Sentry for cove-ocds.

If we set up the Data Review Tools at dedicated subdomains instead of proxying as part of either #266 or #145, then one potential cause for this error might go away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
services Relating to common services like NTP, Apache, uWSGI, cron, etc.
Projects
None yet
Development

No branches or pull requests

2 participants