vivekanand chauhan
vivekanand chauhan

Reputation: 21

Creation of more than one bucket using Amazon S3 on CEPH cluster failes with Error Code 503

Blockquote I am new to ceph hand Amazon S3. I am trying to create more than one bucket with following python script, however I am getting below error.

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') 

Below is the error message:

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>

One bucket gets created successfully. But creation of second bucket bucket fails with error code 503.

Upvotes: 0

Views: 345

Answers (1)

John Hanley
John Hanley

Reputation: 81376

Amazon is throttling your bucket create operations. Amazon does not want you to create one bucket after another in rapid succession. You are limited to the number of buckets that you can create (100). I don't know why Amazon throttles bucket create operations, maybe it is an expensive operation internally to setup storage.

Upvotes: 1

Related Questions