Skip to content
Latchkey

Terragrunt run-all parallelism errors (rate limits, OOM) in CI

By default run-all runs independent units concurrently. On a large stack that can exhaust runner memory or trip cloud-provider API rate limits (throttling), failing units mid-run. Cap concurrency with --terragrunt-parallelism.

What this error means

run-all apply fails with provider throttling ("Rate exceeded" / "429 Too Many Requests"), or the runner is OOM-killed, when many units run at once.

terragrunt
ERRO[0031] [live/prod/app] Error: operation error EC2: RunInstances,
  https response error StatusCode: 400, RequestThrottled: Rate exceeded
(many run-all units hit the provider API concurrently)

Common causes

Too many units call the provider API at once

Concurrent units each hammer the cloud API, exceeding its request rate and getting throttled.

Concurrent Terraform processes exhaust runner memory

Each unit spawns its own Terraform process; many at once can OOM a small runner.

How to fix it

Cap run-all concurrency

Lower parallelism so fewer units run at once, easing API and memory pressure.

Terminal
terragrunt run-all apply --terragrunt-parallelism 4 --terragrunt-non-interactive

Also limit Terraform-level parallelism

Reduce per-unit resource concurrency to further cut API request rate.

Terminal
terragrunt run-all apply --terragrunt-parallelism 4 -- -parallelism=5

How to prevent it

  • Set --terragrunt-parallelism to match your API limits and runner size.
  • Use larger runners for wide stacks, or split the stack.
  • Add retry/backoff via the provider where throttling is expected.

Frequently asked questions

What causes "--terragrunt-parallelism tuning"?
Concurrent units each hammer the cloud API, exceeding its request rate and getting throttled.
How do I fix --terragrunt-parallelism tuning?
Lower parallelism so fewer units run at once, easing API and memory pressure.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card