ECS Concurrent vCPU Limit

Troubleshooting: Unable to place task error

Each Amazon Web Services (AWS) account has a default quota for the amount of services you can run at a single time. The limts are on a per-service basis, and in many cases, also by region.

AWS sets a limit for the number of Fargate vCPU that can run concurrently in the same account. You will need to request to increase the limit to be higher than double the maximum amount of all the vCPU across all your services. This will ensure that you have the capacity to deploy your application when it has scaled up to the maximum. If you hit that limit, you will get the following error:

(service production) (deployment ecs-svc/xxxxxx) deployment failed: tasks failed to start. (service production) was unable to place a task. Reason: You've reached the limit on the number of vCPUs you can run concurrently. For more informa-tion, see the Troubleshooting section of the Amazon ECS Developer Guide.

If this is a new AWS account, and you received this error while just starting with a small application, you might want to activate Fargate in your region. Check this section for more information.

Solution

If you do see the above error, you need to do all or one of the following:

  1. Request a quota increase in AWS console (opens in a new tab) (make sure console is set to correct region)
    • These customer support requests do take time to process on the AWS side, and are not instantaneous.
  2. Reduce your application vCPU requirements by reducing the cpu and/or minimum and maximum number of instances