在CEPH群集上使用Amazon S3创建多个存储桶,错误代码为503

时间:2017-11-08 04:54:35

标签: python amazon-s3 storage ceph

  

块引用   我是新手ceph手中的Amazon S3。我正在尝试使用以下python脚本创建多个存储桶,但是我收到了以下错误。



import boto
import boto.s3.connection
access_key = 'xxx'
secret_key = 'xxxxxxx=='

conn = boto.connect_s3(aws_access_key_id = access_key,aws_secret_access_key = secret_key,host = '127.0.0.1',port = 8000,is_secure=False,               calling_format = boto.s3.connection.OrdinaryCallingFormat(),)
bucket = conn.create_bucket('my-new-bucket')
bucket2 = conn.create_bucket('my-new-bucket2')
bucket3 = conn.create_bucket('my-new-bucket3') 




以下是错误消息:



Traceback (most recent call last):
  File "PythonS3.py", line 8, in <module>
    bucket2 = conn.create_bucket('my-new-bucket2')
  File "/home/vivekanand/.local/lib/python2.7/site-packages/boto/s3/connection.py", line 619, in create_bucket
    data=data)
  File "/home/vivekanand/.local/lib/python2.7/site-packages/boto/s3/connection.py", line 671, in make_request
    retry_handler=retry_handler
  File "/home/vivekanand/.local/lib/python2.7/site-packages/boto/connection.py", line 1071, in make_request
    retry_handler=retry_handler)
  File "/home/vivekanand/.local/lib/python2.7/site-packages/boto/connection.py", line 1028, in _mexe
    raise BotoServerError(response.status, response.reason, body)
boto.exception.BotoServerError: BotoServerError: 503 Slow Down
<?xml version="1.0" encoding="UTF-8"?><Error><Code>SlowDown</Code></Error>
&#13;
&#13;
&#13;

成功创建一个存储桶。但是第二个存储桶的创建失败,错误代码为503。

1 个答案:

答案 0 :(得分:1)

亚马逊正在限制您的存储桶创建操作。亚马逊不希望您快速连续创建一个接一个的存储桶。您只能使用可以创建的存储桶数量(100)。我不知道为什么亚马逊限制了桶创建操作,也许在内部设置存储是一项昂贵的操作。