1

While running a django application on top of apache2 mod_python, I am getting this error message in my apache error log.

[Tue Dec 14 14:26:45 2010] [error] [client SOME_IP] IOError: Write failed, client closed connection., referer: http://example.com/
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1931, in ReportError
    req.write(text)
IOError: Write failed, client closed connection.
[Tue Dec 14 14:26:45 2010] [error] [client SOME_IP] python_handler: Dispatch() returned non-integer., referer: http://example.com/

Can anyone please suggest some solution on this?

2
  • try ask on serverfault.com ;) Commented Dec 14, 2010 at 9:20
  • What Python/Apache/mod_python/Django version do you use? Commented Dec 15, 2010 at 7:16

2 Answers 2

1

The better long-term solution is to not use mod_python, since mod_python is no longer in development, and will not be supported in future versions of Django. Consider using mod_wsgi instead.

The Django documentation has this to say about mod_python:

Support for mod_python has been deprecated, and will be removed in Django 1.5. If you are configuring a new deployment, you are strongly encouraged to consider using mod_wsgi or any of the other supported backends.

Sign up to request clarification or add additional context in comments.

Comments

1

Indicates that the user HTTP client connection was dropped before the complete response could be written back. Nothing one can do about it. Your application should handle it gracefully.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.