aatifh
aatifh

Reputation: 2337

Apache mod_python with django issue

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?

Upvotes: 1

Views: 835

Answers (2)

Graham Dumpleton
Graham Dumpleton

Reputation: 58523

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.

Upvotes: 1

Dominic Rodger
Dominic Rodger

Reputation: 99751

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.

Upvotes: 1

Related Questions