[traceback] IOError: request data read error

RESOLVED FIXED

Status

support.mozilla.org
Code Quality
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: willkg, Assigned: willkg)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: u=dev c=codequality p=1 s=2013.25)

We have 7.1k of these since June 2013. All the ones I've seen seem to be for non-existence URLs, so this probably isn't an issue that's affecting users.

However, it'd be nice to fix.


Internal Server Error: /cs/questions/index.php

Stacktrace (most recent call last):

  File "django/core/handlers/base.py", line 89, in get_response
    response = middleware_method(request)
  File "newrelic/api/object_wrapper.py", line 216, in __call__
    self._nr_instance, args, kwargs)
  File "newrelic/hooks/framework_django.py", line 204, in wrapper
    return wrapped(*args, **kwargs)
  File "kitsune/twitter/middleware.py", line 32, in process_request
    if request.REQUEST.get('twitter_delete_auth'):
  File "django/core/handlers/wsgi.py", line 166, in _get_request
    self._request = datastructures.MergeDict(self.POST, self.GET)
  File "django/core/handlers/wsgi.py", line 180, in _get_post
    self._load_post_and_files()
  File "django/http/__init__.py", line 368, in _load_post_and_files
    self._post, self._files = self.parse_file_upload(self.META, data)
  File "django/http/__init__.py", line 328, in parse_file_upload
    return parser.parse()
  File "newrelic/api/object_wrapper.py", line 216, in __call__
    self._nr_instance, args, kwargs)
  File "newrelic/api/function_trace.py", line 93, in literal_wrapper
    return wrapped(*args, **kwargs)
  File "django/http/multipartparser.py", line 133, in parse
    for item_type, meta_data, field_stream in Parser(stream, self._boundary):
  File "django/http/multipartparser.py", line 587, in __iter__
    for sub_stream in boundarystream:
  File "django/http/multipartparser.py", line 401, in next
    return LazyStream(BoundaryIter(self._stream, self._boundary))
  File "django/http/multipartparser.py", line 427, in __init__
    unused_char = self._stream.read(1)
  File "django/http/multipartparser.py", line 301, in read
    out = ''.join(parts())
  File "django/http/multipartparser.py", line 294, in parts
    chunk = self.next()
  File "django/http/multipartparser.py", line 316, in next
    output = self._producer.next()
  File "django/http/multipartparser.py", line 377, in next
    data = self.flo.read(self.chunk_size)
  File "django/http/__init__.py", line 392, in read
    return self._stream.read(*args, **kwargs)
  File "django/core/handlers/wsgi.py", line 104, in read
    result = self.buffer + self._read_limited(size - len(self.buffer))
  File "django/core/handlers/wsgi.py", line 92, in _read_limited
    result = self.stream.read(size)
  File "newrelic/api/web_transaction.py", line 576, in read
    data = self.__input.read(*args, **kwargs)


Pretty sure we just need to do some IOError catching in the twitter middleware and we're good to go.
Throwing it in the 2013.25 sprint and grabbing it.
Assignee: nobody → willkg
Status: NEW → ASSIGNED
Whiteboard: u=dev c=codequality p=1 s=2013.25
I tossed this in the same PR as another thing I did: https://github.com/mozilla/kitsune/pull/1775
Pushed this to prod just now. I resolved it in Sentry. I'll see if it pops up again. For now, marking this as FIXED.
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.