That doesn't seem to be the culprit. The traceback is pointing to an internal issue at a lower level within werkzeug or at the OS.
I already have max size set and the exception isn't being thrown... MAX_CONTENT_LENGTH = 100 * 1024 * 1024 * 1024 # 100GB On Wednesday, January 14, 2015 at 12:19:52 PM UTC-5, Roy Russo wrote: > > Hello all, > > I've been testing a simple REST endpoint that handles form PUT/POST file > uploads with varying file sizes. It appears there exists a limit at or near > 2GB file sizes that doesn't allow a file larger than 2GB to be uploaded. > Once the upload begins, via a cURL call, the system seems to hang for > several minutes and then dies... > > The endpoint code is fairly simple: > > @staticmethod > def put(): > file = request.files['file'] > > try: > source_extension = os.path.splitext(file.filename)[1] > destination_filename = uuid4().hex + source_extension > file.save(os.path.join(CONFIG.TMP_DIR, destination_filename)) > except: > msg = 'Unable to process file upload' > LOG.exception(msg) > return APIError(client.INTERNAL_SERVER_ERROR, False, > msg).make_error() > > return RESTResponse([], client.OK, None) > > > > > > > > > > > > > > Traceback (most recent call last): > > File "/usr/local/lib/python3.4/site-packages/flask/app.py", line 1836, > in __call__ > > return self.wsgi_app(environ, start_response) > > File "/usr/local/lib/python3.4/site-packages/flask/app.py", line 1820, > in wsgi_app > > response = self.make_response(self.handle_exception(e)) > > File "/usr/local/lib/python3.4/site-packages/flask_cors.py", line 272, > in wrapped_function > > return cors_after_request(app.make_response(f(*args, **kwargs))) > > File "/usr/local/lib/python3.4/site-packages/flask_restful/__init__.py", > line 261, in error_router > > return self.handle_error(e) > > File "/usr/local/lib/python3.4/site-packages/flask/app.py", line 1817, > in wsgi_app > > response = self.full_dispatch_request() > > File "/usr/local/lib/python3.4/site-packages/flask/app.py", line 1477, > in full_dispatch_request > > rv = self.handle_user_exception(e) > > File "/usr/local/lib/python3.4/site-packages/flask_cors.py", line 272, > in wrapped_function > > return cors_after_request(app.make_response(f(*args, **kwargs))) > > File "/usr/local/lib/python3.4/site-packages/flask_restful/__init__.py", > line 261, in error_router > > return self.handle_error(e) > > File "/usr/local/lib/python3.4/site-packages/flask/app.py", line 1475, > in full_dispatch_request > > rv = self.dispatch_request() > > File "/usr/local/lib/python3.4/site-packages/flask/app.py", line 1461, > in dispatch_request > > return self.view_functions[rule.endpoint](**req.view_args) > > File "/usr/local/lib/python3.4/site-packages/flask_restful/__init__.py", > line 430, in wrapper > > resp = resource(*args, **kwargs) > > File "/usr/local/lib/python3.4/site-packages/flask/views.py", line 84, > in view > > return self.dispatch_request(*args, **kwargs) > > File "/usr/local/lib/python3.4/site-packages/flask_restful/__init__.py", > line 520, in dispatch_request > > resp = meth(*args, **kwargs) > > File "/Users/royrusso/dev/predikto/predikto-rest/predikto/api/upload.py" > , line 17, in put > > file = request.files['file'] > > File "/usr/local/lib/python3.4/site-packages/werkzeug/local.py", line > 338, in __getattr__ > > return getattr(self._get_current_object(), name) > > File "/usr/local/lib/python3.4/site-packages/werkzeug/utils.py", line 71 > , in __get__ > > value = self.func(obj) > > File "/usr/local/lib/python3.4/site-packages/werkzeug/wrappers.py", > line 512, in files > > self._load_form_data() > > File "/usr/local/lib/python3.4/site-packages/flask/wrappers.py", line > 165, in _load_form_data > > RequestBase > ... -- You received this message because you are subscribed to the Google Groups "pocoo-libs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pocoo-libs. For more options, visit https://groups.google.com/d/optout.
