问题描述
当文件完成上传时,服务器会报告:
I'm uploading a small file (8.5 Mb) to a flask test server.
When the file finishes uploading, the server reports:
已经查看了以尝试查找位置Werkzeug试图写信,但不能追查。
File "/home/ubuntu/.virtualenvs/eco_app/lib/python2.7/site-packages/wtforms/form.py", line 212, in __call__ return type.__call__(cls, *args, **kwargs) File "/home/ubuntu/.virtualenvs/eco_app/lib/python2.7/site-packages/flask_wtf/form.py", line 49, in __init__ formdata = request.form File "/home/ubuntu/.virtualenvs/eco_app/lib/python2.7/site-packages/werkzeug/local.py", line 338, in __getattr__ return getattr(self._get_current_object(), name) File "/home/ubuntu/.virtualenvs/eco_app/lib/python2.7/site-packages/werkzeug/utils.py", line 71, in __get__ value = self.func(obj) File "/home/ubuntu/.virtualenvs/eco_app/lib/python2.7/site-packages/werkzeug/wrappers.py", line 484, in form self._load_form_data() File "/home/ubuntu/.virtualenvs/eco_app/lib/python2.7/site-packages/flask/wrappers.py", line 165, in _load_form_data RequestBase._load_form_data(self) File "/home/ubuntu/.virtualenvs/eco_app/lib/python2.7/site-packages/werkzeug/wrappers.py", line 356, in _load_form_data mimetype, content_length, options) File "/home/ubuntu/.virtualenvs/eco_app/lib/python2.7/site-packages/werkzeug/formparser.py", line 193, in parse content_length, options) File "/home/ubuntu/.virtualenvs/eco_app/lib/python2.7/site-packages/werkzeug/formparser.py", line 99, in wrapper return f(self, stream, *args, **kwargs) File "/home/ubuntu/.virtualenvs/eco_app/lib/python2.7/site-packages/werkzeug/formparser.py", line 210, in _parse_multipart form, files = parser.parse(stream, boundary, content_length) File "/home/ubuntu/.virtualenvs/eco_app/lib/python2.7/site-packages/werkzeug/formparser.py", line 520, in parse return self.cls(form), self.cls(files) File "/home/ubuntu/.virtualenvs/eco_app/lib/python2.7/site-packages/werkzeug/datastructures.py", line 373, in __init__ for key, value in mapping or (): File "/home/ubuntu/.virtualenvs/eco_app/lib/python2.7/site-packages/werkzeug/formparser.py", line 518, in <genexpr> form = (p[1] for p in formstream if p[0] == 'form') File "/home/ubuntu/.virtualenvs/eco_app/lib/python2.7/site-packages/werkzeug/formparser.py", line 494, in parse_parts _write(ell)IOError: [Errno 28] No space left on device
我也检查了,它将/ var / tmp作为临时文件目录,但是这个文件夹实际上是空的,所以我不认为这是造成问题的位置。
Now, the server has plenty of free space - over 3Gb.
如何找到没有空间的设备?
This unix SE answer explains what happened.
我卸载/ tmp目录并遵循Nitesh的建议:
I unmounted /tmp directory and followed Nitesh's suggestion:
sudo umount /tmp
sudo echo 'MINTMPKB=0' > sudo /etc/default/mountoverflowtmp
现在上传正常。
这篇关于IOError:设备上没有剩余空间 - 哪个设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!