First time here? Check out the FAQ!
0

What is the cause of repeated UnreadablePostError Internal Server Errors?

We intermittently receive Internal Server Errors as UnreadablePostError reports from our instance (version 0.7.49).

We would really like to know the cause...

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/askbot/middleware/cancel.py", line 5, in process_view
    if 'cancel' in request.REQUEST:

  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 166, in _get_request
    self._request = datastructures.MergeDict(self.POST, self.GET)

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

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

  File "/usr/local/lib/python2.7/dist-packages/django/http/__init__.py", line 328, in body
    self._body = self.read()

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

  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 98, in read
    result = self.buffer + self._read_limited()

  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 92, in _read_limited
    result = self.stream.read(size)

UnreadablePostError: request data read error


<WSGIRequest
path:/questions/264/answer/,
GET:<QueryDict: {}>,
POST:<could not parse>,
COOKIES:{'_csrf': 'aTmumPmsilH2HR1HdxeUDp5o7j0yQG1m',
 'sessionid': 'a669f30152a30d14c4fd30d1ca107f47'},
META:{'CONTENT_LENGTH': '3940',
 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
 'CONTEXT_PREFIX': '',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT': 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_CONNECTION': 'Close',
 'HTTP_COOKIE': '_csrf=aTmumPmsilH2HR1HdxeUDp5o7j0yQG1m; sessionid=a669f30152a30d14c4fd30d1ca107f47',
 'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)',
 'PATH_INFO': u'/questions/264/answer/',
'SERVER_PORT': '80',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SIGNATURE': '',
 'SERVER_SOFTWARE': 'Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.4 mod_python/3.3.1 Python/2.7.6 OpenSSL/1.0.1f mod_wsgi/3.4',
 'mod_wsgi.callable_object': 'application',
 'mod_wsgi.enable_sendfile': '0',
 'mod_wsgi.handler_script': '',
 'mod_wsgi.input_chunked': '0',
 'mod_wsgi.listener_host': '',
 'mod_wsgi.listener_port': '80',
 'mod_wsgi.process_group': 'askbot2',
 'mod_wsgi.queue_start': '1411818270996980',
 'mod_wsgi.request_handler': 'wsgi-script',
 'mod_wsgi.script_reloading': '1',
 'mod_wsgi.version': (3, 4),
 'wsgi.errors': <mod_wsgi.Log object at 0x7f409d3beb70>,
 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7f409dfc8c60>,
 'wsgi.input': <mod_wsgi.Input object at 0x7f409d178fb0>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}>
Rupreck's avatar
305
Rupreck
asked 2014-09-27 10:03:24 -0500, updated 2014-10-02 03:18:35 -0500
edit flag offensive 0 remove flag close merge delete

Comments

This issue *mostly* disappears by disabling Anonymous Questions / Answers by reducing the number of spam submissions to the answer page and (in turn) reducing the percentage of failed, interrupted postings. But doing this reduces functionality substantially. I would be useful to be able to disable the message, and require a captcha when posting anonymously . How can this be done?

Rupreck's avatar Rupreck (2014-10-05 02:02:51 -0500) edit
add a comment see more comments

1 Answer

-1

ok nice one

yesammy's avatar
1
yesammy
answered 2014-10-03 01:03:08 -0500, updated 2014-10-03 01:03:31 -0500
edit flag offensive 0 remove flag delete link

Comments

remove extraneous answer please

Rupreck's avatar Rupreck (2014-10-05 02:03:56 -0500) edit
add a comment see more comments