开发者社区> 问答> 正文

OSS大文件分块并发上传抛异常RequestError: ('Connection aborted.', timeout('timed out',))

bucket.upload_part时偶尔会抛出以下异常:

Exception in thread Thread-43:
Traceback (most recent call last):
File "/usr/lib64/python2.6/threading.py", line 532, in bootstrap_inner
self.run()
File "/usr/lib64/python2.6/threading.py", line 484, in run
self.target(self.__args, *self.__kwargs)
File "ali_concurrence.py", line 43, in do_upload
result = self.bucket.upload_part(self.key, self.upload_id, self.part_number, SizedFileAdapter(self.fileobj, self.num_to_upload))
File "/usr/lib/python2.6/site-packages/oss2-2.1.1-py2.6.egg/oss2/api.py", line 589, in upload_part
data=data)
File "/usr/lib/python2.6/site-packages/oss2-2.1.1-py2.6.egg/oss2/api.py", line 863, in __do_object
return self._do(method, self.bucket_name, key, **kwargs)
File "/usr/lib/python2.6/site-packages/oss2-2.1.1-py2.6.egg/oss2/api.py", line 146, in _do
resp = self.session.do_request(req, timeout=self.timeout)
File "/usr/lib/python2.6/site-packages/oss2-2.1.1-py2.6.egg/oss2/http.py", line 44, in do_request
raise RequestError(e)
RequestError: {'status': -2, 'details': "RequestError: ('Connection aborted.', timeout('timed out',))"}

展开
收起
三木鱼 2016-05-17 18:29:35 11608 0
2 条回答
写回答
取消 提交回答
  • 求解,我也遇到了这个问题

    2020-09-01 16:49:32
    赞同 展开评论 打赏
  • 这个问题后来怎么解决的?遇到了同样的问题

    2020-08-17 17:49:31
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
OSS运维进阶实战手册 立即下载
《OSS运维基础实战手册》 立即下载
OSS运维基础实战手册 立即下载