Apache mod_python with django issue
Question: 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?


Answer: 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](http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/)
instead.

The [Django
documentation](http://docs.djangoproject.com/en/dev/howto/deployment/modpython/)
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.

