版本: Python 2.7.12 oss 2.2.3
连着上传两张图片,两张图片一样,上传目录不一样
第一张显示上传成功,第二张就超时Read timed out
如果两张图不一样 就都可以上传成功
error:
image/png
Tue, 07 Feb 2017 03:25:08 GMT
/mosfile/test/oriphoto/201702/6384202202403373056.png
[2017-02-07 11:25:08,689] DEBUG [requests.packages.urllib3.connectionpool] _new_conn connectionpool.py:207 Starting new HTTP connection (1): mosfile.oss-cn-hangzhou.aliyuncs.com
[2017-02-07 11:25:09,135] DEBUG [requests.packages.urllib3.connectionpool] _make_request connectionpool.py:395 http://mosfile.oss-cn-hangzhou.aliyuncs.com:80 "PUT /test%2Foriphoto%2F201702%2F6384202202403373056.png HTTP/1.1" 200 0
[2017-02-07 11:25:09,136] ERROR [lib.file_store] oss_save_file file_store.py:39 200 58993E175CC26B7E56D621DC
[2017-02-07 11:25:09,143] DEBUG [PIL.PngImagePlugin] call PngImagePlugin.py:135 STREAM 'IHDR' 16 13
[2017-02-07 11:25:09,143] DEBUG [PIL.PngImagePlugin] call PngImagePlugin.py:135 STREAM 'IDAT' 41 20257
[2017-02-07 11:25:09,144] DEBUG [root] __make_signature auth.py:50 string_to_sign=PUT
image/png
Tue, 07 Feb 2017 03:25:09 GMT
/mosfile/test/photo/53/6384202206698340353.png
[2017-02-07 11:25:09,145] DEBUG [requests.packages.urllib3.connectionpool] _new_conn connectionpool.py:207 Starting new HTTP connection (2): mosfile.oss-cn-hangzhou.aliyuncs.com
[2017-02-07 11:26:09,269] ERROR [lib.file_store] oss_save_file file_store.py:41 Traceback (most recent call last):
File "/home/sjw/web_app/lib/file_store.py", line 37, in oss_save_file
response = bucket.put_object(file_name, content)
File "/home/sjw/local/python/lib/python2.7/site-packages/oss2/api.py", line 346, in put_object
resp = self.__do_object('PUT', key, data=data, headers=headers)
File "/home/sjw/local/python/lib/python2.7/site-packages/oss2/api.py", line 1028, in __do_object
return self._do(method, self.bucket_name, key, **kwargs)
File "/home/sjw/local/python/lib/python2.7/site-packages/oss2/api.py", line 146, in _do
resp = self.session.do_request(req, timeout=self.timeout)
File "/home/sjw/local/python/lib/python2.7/site-packages/oss2/http.py", line 44, in do_request
raise RequestError(e)
RequestError: {'status': -2, 'details': "RequestError: HTTPConnectionPool(host='mosfile.oss-cn-hangzhou.aliyuncs.com', port=80): Read timed out. (read timeout=60)"}
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。