Ich scheine häufig einen IOError zu bekommen: Anforderungsdatenlesefehler, wenn ich einen Ajax-Upload mache. Zum Beispiel tritt bei mindestens 3 von 5 Datei-Uploads ein Fehler auf.
Andere Leute scheinen dasselbe Problem gehabt zu haben. z.B.
- Django-Upload schlägt fehl aufgrund eines Anforderungsdatenlesefehlers
- Django-Datei-Upload schlägt gelegentlich fehl
Einige andere Beobachtungen:
-
Es liegt definitiv nicht an meiner Internetverbindung oder einem Browserproblem. Es scheint in allen Browsern chrome/FF/opera zu passieren.
-
Ich verwende Django 1.1.1 Apache/2.2.14 (Ubuntu) mod_ssl/2.2.14 OpenSSL/0.9.8k mod_wsgi/2.8 Python/2.6.5 auf Lucid.
-
Es liegt auch nicht an der Dateigröße. Manchmal kann ich 1+ MB Dateien hochladen, aber bei 180 KB Dateien scheitern.
Aufrufliste
Aufrufliste (letzter Aufruf zuerst):
Datei "/home/ubuntu/.virtualenvs/anonymous_app/lib/python2.6/site-packages/django/core/handlers/base.py", Zeile 98, in get_response
response = middleware_method(request, e)
Datei "/home/ubuntu/.virtualenvs/anonymous_app/lib/python2.6/site-packages/django/core/handlers/base.py", Zeile 92, in get_response
response = callback(request, *callback_args, **callback_kwargs)
Datei "/home/ubuntu/.virtualenvs/anonymous_app/lib/python2.6/site-packages/django/contrib/auth/decorators.py", Zeile 78, in __call__
return self.view_func(request, *args, **kwargs)
Datei "/home/ubuntu/webapps/anonymous_app/app/do_work/views/__init__.py", Zeile 391, in some_form_ajax_upload
f = request.FILES.get('file_upload')
Datei "/home/ubuntu/.virtualenvs/anonymous_app/lib/python2.6/site-packages/django/core/handlers/wsgi.py", Zeile 187, in _get_files
self._load_post_and_files()
Datei "/home/ubuntu/.virtualenvs/anonymous_app/lib/python2.6/site-packages/django/core/handlers/wsgi.py", Zeile 137, in _load_post_and_files
self._post, self._files = self.parse_file_upload(self.META, self.environ['wsgi.input'])
Datei "/home/ubuntu/.virtualenvs/anonymous_app/lib/python2.6/site-packages/django/http/__init__.py", Zeile 124, in parse_file_upload
return parser.parse()
Datei "/home/ubuntu/.virtualenvs/anonymous_app/lib/python2.6/site-packages/django/http/multipartparser.py", Zeile 133, in parse
for item_type, meta_data, field_stream in Parser(stream, self._boundary):
Datei "/home/ubuntu/.virtualenvs/anonymous_app/lib/python2.6/site-packages/django/http/multipartparser.py", Zeile 606, in __iter__
for sub_stream in boundarystream:
Datei "/home/ubuntu/.virtualenvs/anonymous_app/lib/python2.6/site-packages/django/http/multipartparser.py", Zeile 420, in next
return LazyStream(BoundaryIter(self._stream, self._boundary))
Datei "/home/ubuntu/.virtualenvs/anonymous_app/lib/python2.6/site-packages/django/http/multipartparser.py", Zeile 446, in __init__
unused_char = self._stream.read(1)
Datei "/home/ubuntu/.virtualenvs/anonymous_app/lib/python2.6/site-packages/django/http/multipartparser.py", Zeile 299, in read
out = ''.join(parts())
Datei "/home/ubuntu/.virtualenvs/anonymous_app/lib/python2.6/site-packages/django/http/multipartparser.py", Zeile 292, in parts
chunk = self.next()
Datei "/home/ubuntu/.virtualenvs/anonymous_app/lib/python2.6/site-packages/django/http/multipartparser.py", Zeile 314, in next
output = self._producer.next()
Datei "/home/ubuntu/.virtualenvs/anonymous_app/lib/python2.6/site-packages/django/http/multipartparser.py", Zeile 375, in next
data = self.flo.read(self.chunk_size)
Datei "/home/ubuntu/.virtualenvs/anonymous_app/lib/python2.6/site-packages/django/http/multipartparser.py", Zeile 405, in read
return self._file.read(num_bytes)
IOError: Anforderungsdatenlesefehler
,
POST:,
COOKIES:{'__utma': '168279989.1688771210.1285773436.1285773436.1285773436.1',
'__utmb': '168279989.20.10.1285773436',
'__utmc': '168279989',
'__utmz': '168279989.1285773436.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
'beta': 'True',
'sessionid': 'b1ecf92f2bba13e1885d07803e10aa03',
'timezone_offset': '-330'},
META:{'CONTENT_LENGTH': '188575',
'CONTENT_TYPE': 'multipart/form-data; boundary=---------------------------57602381214905740261171925981',
'DOCUMENT_ROOT': '/htdocs',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTPS': '1',
'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',
'HTTP_CONNECTION': 'keep-alive',
'HTTP_COOKIE': 'beta=True; __utma=168279989.1688771210.1285773436.1285773436.1285773436.1; __utmb=168279989.20.10.1285773436; __utmc=168279989; __utmz=168279989.1285773436.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); sessionid=b1ecf92f2bba13e1885d07803e10aa03; timezone_offset=-330',
'HTTP_HOST': 'xxxxxx.compute-1.amazonaws.com',
'HTTP_KEEP_ALIVE': '115',
'HTTP_REFERER': 'https://ec2-184-72-79-96.compute-1.amazonaws.com/do-my-somees/enter/some-documents/',
'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100915 Ubuntu/10.04 (lucid) Firefox/3.6.10',
'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin',
'PATH_INFO': u'/do-my-somees/enter/some-documents/ajax-upload/Other-some-Document/',
'PATH_TRANSLATED': '/home/ubuntu/webapps/anonymous_app/settings/apache/qa.wsgi.py/do-my-somees/enter/some-documents/ajax-upload/Other-some-Document/',
'QUERY_STRING': '',
'REMOTE_ADDR': '',
'REMOTE_PORT': '15561',
'REQUEST_METHOD': 'POST',
'REQUEST_URI': '/do-my-somees/enter/some-documents/ajax-upload/Other-some-Document/',
'SCRIPT_FILENAME': '/home/ubuntu/webapps/anonymous_app/settings/apache/qa.wsgi.py',
'SCRIPT_NAME': u'',
'SERVER_ADDR': '10.196.142.182',
'SERVER_ADMIN': 'dev@anonymous_app.com',
'SERVER_NAME': 'ec2-184-72-79-96.compute-1.amazonaws.com',
'SERVER_PORT': '443',
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SIGNATURE': 'Apache/2.2.14 (Ubuntu) Server at ec2-184-72-79-96.compute-1.amazonaws.com Port 443\n',
'SERVER_SOFTWARE': 'Apache/2.2.14 (Ubuntu)',
'SSL_TLS_SNI': 'ec2-184-72-79-96.compute-1.amazonaws.com',
'mod_wsgi.application_group': 'qa.anonymous_app.com|',
'mod_wsgi.callable_object': 'application',
'mod_wsgi.listener_host': '',
'mod_wsgi.listener_port': '443',
'mod_wsgi.process_group': '',
'mod_wsgi.reload_mechanism': '0',
'mod_wsgi.script_reloading': '1',
'mod_wsgi.version': (2, 8),
'wsgi.errors': ,
'wsgi.file_wrapper': ,
'wsgi.input': ,
'wsgi.multiprocess': True,
'wsgi.multithread': False,
'wsgi.run_once': False,
'wsgi.url_scheme': 'https',
'wsgi.version': (1, 0)}>