Python – Apache2 Modpython : IOError: Write failed, client closed connection

apache-2.2djangopython

This is the error :

[Mon Mar 01 12:19:50 2010] [error] [client XXX.XXX.248.60] mod_python (pid=9528, interpreter='realpage.com', phase='PythonHandler', handler='django.core.handlers.modpython'): Application error
[Mon Mar 01 12:19:50 2010] [error] [client XXX.XXX.248.60] ServerName: 'realpage.dom'
[Mon Mar 01 12:19:50 2010] [error] [client XXX.XXX.248.60] DocumentRoot: '/htdocs'
[Mon Mar 01 12:19:50 2010] [error] [client XXX.XXX.248.60] URI: '/'
[Mon Mar 01 12:19:50 2010] [error] [client XXX.XXX.248.60] Location: '/'
[Mon Mar 01 12:19:50 2010] [error] [client XXX.XX.248.60] Directory: None
[Mon Mar 01 12:19:50 2010] [error] [client XXX.XXX.248.60] Filename: '/htdocs'
[Mon Mar 01 12:19:50 2010] [error] [client XXX.XXX.248.60] PathInfo: '/'
[Mon Mar 01 12:19:50 2010] [error] [client XXX.XXX.248.60] Traceback (most recent call last):
[Mon Mar 01 12:19:50 2010] [error] [client XXX.XXX.248.60]   File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch\n    default=default_handler, arg=req, silent=hlist.silent)
[Mon Mar 01 12:19:50 2010] [error] [client XXX.XXX.248.60]   File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1229, in _process_target\n    result = _execute_target(config, req, object, arg)
[Mon Mar 01 12:19:50 2010] [error] [client XXX.XXX.248.60]   File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1128, in _execute_target\n    result = object(arg)
[Mon Mar 01 12:19:50 2010] [error] [client XXX.XXX.248.60]   File "/usr/lib/python2.5/site-packages/django/core/handlers/modpython.py", line 228, in handler\n    return ModPythonHandler()(req)
[Mon Mar 01 12:19:50 2010] [error] [client XXX.XXX.248.60]   File "/usr/lib/python2.5/site-packages/django/core/handlers/modpython.py", line 220, in __call__\n    req.write(chunk)
[Mon Mar 01 12:19:50 2010] [error] [client XXX.XX.248.60] IOError: Write failed, client closed connection.

Please! I am sure you need more information in order to find the bug, please tell me what and how to get it.

The error is throwing every time!

Best Answer

As the message explains, this occurs where the handler attempts to write data back to the client after the client has closed the connection. This could occur where client user of the client pressed reload before waiting for a response. It might also occur where the handler tries to write back significantly more data than was specified by the response content length.

Related Topic