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

OSError: failed to write data #60

Closed
ajendrex opened this Issue Nov 21, 2014 · 4 comments

Comments

Projects
None yet
2 participants
@ajendrex

ajendrex commented Nov 21, 2014

Hello,

I have a django website on mod_wsgi. Some users report that they get a 500 http error when uploading files. This is the related log that I can find on apache:

[Fri Nov 21 10:43:50.959284 2014] [wsgi:info] [pid 29924] mod_wsgi (pid=29924): Initializing Python.
[Fri Nov 21 10:43:50.984605 2014] [wsgi:info] [pid 29924] mod_wsgi (pid=29924): Attach interpreter ''.
[Fri Nov 21 10:43:50.985193 2014] [wsgi:info] [pid 29924] mod_wsgi (pid=29924): Adding '/home/django/project/path' to path.
[Fri Nov 21 10:43:52.169865 2014] [reqtimeout:info] [pid 28915] [client 172.50.1.26:54062] AH01382: Request header read timeout
[Fri Nov 21 10:43:57.966591 2014] [wsgi:info] [pid 29832] mod_wsgi (pid=29832): Destroying interpreters.
[Fri Nov 21 10:43:57.966619 2014] [wsgi:info] [pid 29832] mod_wsgi (pid=29832): Destroy interpreter 'uddo.server.com|'.
[Fri Nov 21 10:43:57.966703 2014] [wsgi:info] [pid 29832] mod_wsgi (pid=29832): End interpreter 'uddo.server.com|'.
[Fri Nov 21 10:43:58.036602 2014] [wsgi:info] [pid 29832] mod_wsgi (pid=29832): Cleanup interpreter ''.
[Fri Nov 21 10:43:58.048768 2014] [wsgi:info] [pid 29832] mod_wsgi (pid=29832): Terminating Python.
[Fri Nov 21 10:43:58.054999 2014] [wsgi:info] [pid 29832] mod_wsgi (pid=29832): Python has shutdown.
[Fri Nov 21 10:44:21.992800 2014] [wsgi:info] [pid 29932] mod_wsgi (pid=29932): Initializing Python.
[Fri Nov 21 10:44:22.017128 2014] [wsgi:info] [pid 29932] mod_wsgi (pid=29932): Attach interpreter ''.
[Fri Nov 21 10:44:22.017706 2014] [wsgi:info] [pid 29932] mod_wsgi (pid=29932): Adding '/home/django/project/path' to path.
[Fri Nov 21 10:45:52.087981 2014] [wsgi:info] [pid 1751] mod_wsgi (pid=1751): Destroying interpreters.
[Fri Nov 21 10:45:52.088013 2014] [wsgi:info] [pid 1751] mod_wsgi (pid=1751): Destroy interpreter 'uddo.server.com|'.
[Fri Nov 21 10:45:52.088111 2014] [wsgi:info] [pid 1751] mod_wsgi (pid=1751): End interpreter 'uddo.server.com|'.
[Fri Nov 21 10:45:52.167751 2014] [wsgi:info] [pid 1751] mod_wsgi (pid=1751): Cleanup interpreter ''.
[Fri Nov 21 10:45:52.180180 2014] [wsgi:info] [pid 1751] mod_wsgi (pid=1751): Terminating Python.
[Fri Nov 21 10:45:52.186670 2014] [wsgi:info] [pid 1751] mod_wsgi (pid=1751): Python has shutdown.
[Fri Nov 21 10:46:57.849928 2014] [wsgi:error] [pid 29247] [client 200.27.72.251:22838] mod_wsgi (pid=29247): Exception occurred processing WSGI script '/home/django/project/path/wsgi.py'.
[Fri Nov 21 10:46:57.850028 2014] [wsgi:error] [pid 29247] [client 200.27.72.251:22838] OSError: failed to write data
[Fri Nov 21 10:47:24.193165 2014] [wsgi:info] [pid 29932] mod_wsgi (pid=29932): Create interpreter 'uddo.server.com|'.

I haven't get much info from users yet, as soon as I have more info I will update.

Hector.

@GrahamDumpleton

This comment has been minimized.

Show comment
Hide comment
@GrahamDumpleton

GrahamDumpleton Nov 21, 2014

Owner

An IOError exception without a stack trace like that means that the HTTP client connection was dropped while the response was being written back to the client. In other words, the browser quit or the network connection broken for some reason.

That you are seeing the message though suggests you are using an ancient mod_wsgi version as my recollection is that newer versions of mod_wsgi do not log that message unless more verbose logging is enabled, or maybe not at all.

What mod_wsgi version are you using? The latest version is 4.3.2.

Owner

GrahamDumpleton commented Nov 21, 2014

An IOError exception without a stack trace like that means that the HTTP client connection was dropped while the response was being written back to the client. In other words, the browser quit or the network connection broken for some reason.

That you are seeing the message though suggests you are using an ancient mod_wsgi version as my recollection is that newer versions of mod_wsgi do not log that message unless more verbose logging is enabled, or maybe not at all.

What mod_wsgi version are you using? The latest version is 4.3.2.

@ajendrex

This comment has been minimized.

Show comment
Hide comment
@ajendrex

ajendrex Nov 21, 2014

I had 4.3.0, but now I realized the problem was somewhere else, sorry for the noise!

ajendrex commented Nov 21, 2014

I had 4.3.0, but now I realized the problem was somewhere else, sorry for the noise!

@ajendrex ajendrex closed this Nov 21, 2014

@GrahamDumpleton

This comment has been minimized.

Show comment
Hide comment
@GrahamDumpleton

GrahamDumpleton Nov 22, 2014

Owner

FWIW, the error message you quote changes in the next version of mod_wsgi, with it actually displaying the underlying reason as to why data couldn't be written. Normally that will be that the connection is closed, but feasibly it could be for some other reason.

Owner

GrahamDumpleton commented Nov 22, 2014

FWIW, the error message you quote changes in the next version of mod_wsgi, with it actually displaying the underlying reason as to why data couldn't be written. Normally that will be that the connection is closed, but feasibly it could be for some other reason.

@ajendrex

This comment has been minimized.

Show comment
Hide comment
@ajendrex

ajendrex Nov 22, 2014

Great Graham!

Thank you very much for your work! :)

ajendrex commented Nov 22, 2014

Great Graham!

Thank you very much for your work! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment