[DigitalOcean] Solution for 'You cannot create more than 10 droplets at a time' Error

Tadashi Shigeoka ·  Wed, August 9, 2017

When trying to create more than 10 droplets (servers) via the DigitalOcean API, I encountered the You cannot create more than 10 droplets at a time error.

Error Message: You cannot create more than 10 droplets at a time

When I tried to create 20 droplets using the official gem droplet_kit for handling the DigitalOcean API, I encountered the following You cannot create more than 10 droplets at a time (DropletKit::FailedCreate) error.

/usr/local/rvm/gems/ruby-2.4.0@serposcope/gems/droplet_kit-2.0.1/lib/droplet_kit/mappings/error_mapping.rb:16:in `fail_with': You cannot create more than 10 droplets at a time (DropletKit::FailedCreate)
  from /usr/local/rvm/gems/ruby-2.4.0@serposcope/gems/droplet_kit-2.0.1/lib/droplet_kit/resources/droplet_resource.rb:24:in `block (3 levels) in '
  from /usr/local/rvm/gems/ruby-2.4.0@serposcope/gems/resource_kit-0.1.6/lib/resource_kit/action_invoker.rb:19:in `instance_exec'
  from /usr/local/rvm/gems/ruby-2.4.0@serposcope/gems/resource_kit-0.1.6/lib/resource_kit/action_invoker.rb:19:in `handle_response'
  from /usr/local/rvm/gems/ruby-2.4.0@serposcope/gems/resource_kit-0.1.6/lib/resource_kit/action_invoker.rb:14:in `call'
  from /usr/local/rvm/gems/ruby-2.4.0@serposcope/gems/resource_kit-0.1.6/lib/resource_kit/method_factory.rb:16:in `block in method_for_action'
  from add_proxy.rb:33:in `create_proxy_servers'
  from add_proxy.rb:51:in `
'

DigitalOcean only allows creating 10 droplets (servers) after new registration, but after using it for a while, your track record or trust accumulates and you can create up to 20.

However, the number of droplets that can be batch-created via API remains at 10, so if you want to create more than that, you need to split the API calls into two or more separate calls.

That’s all from the Gemba.