IOError:设备上没有剩余空间-哪个设备?
我正在将一个小文件(8.5 Mb)上传到烧瓶测试服务器。
文件上传完成后,服务器报告:
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
现在,服务器具有足够的可用空间-超过3Gb。
我查看了Werkzeug github存储库,以查找Werkzeug尝试写入的位置,但无法对其进行跟踪。
我还检查了tempfile.gettempdir(),该文件将/ var / tmp用作临时文件目录,但是该文件夹实际上是空的,因此我不认为这是造成此问题的位置。
回答:
为了防止磁盘空间不足,如果根分区的磁盘空间不足,某些守护程序会用ram磁盘自动“遮盖”当前/ tmp /目录。遗憾的是,一旦再次释放了足够的磁盘空间,该过程就不会自动恢复。
我卸载了/ tmp目录,并遵循了Nitesh的建议:
sudo umount /tmpsudo echo 'MINTMPKB=0' > sudo /etc/default/mountoverflowtmp
现在上传正常。
以上是 IOError:设备上没有剩余空间-哪个设备? 的全部内容, 来源链接: utcz.com/qa/417777.html