1

My site is an Intranet and has hundreds of hits by day. The issue is that django crash some times and I received this trace back error:

Traceback (most recent call last):

  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 105, in get_response
    response = middleware_method(request, callback, callback_args, callback_kwargs)

  File "/usr/local/lib/python2.7/dist-packages/django/middleware/csrf.py", line 200, in process_view
    request_csrf_token = request.POST.get('csrfmiddlewaretoken', '')

  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 210, in _get_post
    self._load_post_and_files()

  File "/usr/local/lib/python2.7/dist-packages/django/http/__init__.py", line 284, in _load_post_and_files
    self._post, self._files = QueryDict(self.raw_post_data, encoding=self._encoding), MultiValueDict()

  File "/usr/local/lib/python2.7/dist-packages/django/http/__init__.py", line 248, in _get_raw_post_data
    self._raw_post_data = self.read(content_length)

  File "/usr/local/lib/python2.7/dist-packages/django/http/__init__.py", line 296, in read
    return self._stream.read(*args, **kwargs)

IOError: request data read error

And the relevant information is that I have found this on debug data all times that program crash:

 'HTTP_USER_AGENT': 'Mozilla/5.0 (BlackBerry; U; BlackBerry 9300; es) AppleWebKit/534.8+ (KHTML, like Gecko) Version/6.0.0.668 Mobile Safari/534.8+',
 'HTTP_X_RIM_HTTPS': '1.1',
 'HTTP_X_WAP_PROFILE': '"http://www.blackberry.net/go/mobile/profiles/uaprof/9300_edge/6.0.0.rdf"',

App crash in login form. Some ideas?

dani herrera
  • 48,760
  • 8
  • 117
  • 177
  • http://stackoverflow.com/questions/12257618/django-request-post-contains-could-not-parse – Vivek S Oct 18 '12 at 07:36
  • 1
    I am seeing the same problem with django 1.6.5 and wsgi 3.3. The stacktrace looks slightly different, but the essence is the same. As far as I can tell it happens if too long time passes between the client sending the request and the post data. – kasperd Dec 09 '14 at 17:06

1 Answers1

1

as you might think, this is no django error.

see https://groups.google.com/group/django-users/browse_thread/thread/946936f69c012d96

have the error myself (but IE ajax requests only, no file upload, just post data).

will add an complete answer if i ever find out how to fix this.

REF: IOError: request data read error

Community
  • 1
  • 1
Vivek S
  • 5,384
  • 8
  • 51
  • 72
  • 1
    For now I will suppress 'error' notification ( http://stackoverflow.com/a/10284245/842935 ). Please, be free to post a complete answer to help future users. – dani herrera Oct 18 '12 at 07:49