Bitbucket "Allocated memory" Exceeded for Services
By Kaveh Alemi·Latchkey
You asked services for more memory than the step has to give. Each step has a total memory budget shared between the build container and every service; the sum cannot exceed it.
What this error means
The pipeline fails configuration or startup with a message that the total memory requested for services exceeds the available step memory, or that a service exceeded its allocation. It surfaces as soon as the step tries to start its services.
Bitbucket UI
The total memory allocated for services (4096 MB) exceeds the
available memory for the step. Increase the step size or reduce
service memory.
Common causes
Service memory sums above the step budget
A 1x step has a fixed total. The build container reserves part of it; whatever is left is all the services can share. Requesting more across services overcommits the step.
A single service requests too much
One service with a large memory: value can leave too little for the build container, or exceed the per-step ceiling outright.
How to fix it
Increase the step size
A 2x step roughly doubles the total memory pool, giving services more room.
Add up service memory and keep it within the step budget minus the build reserve.
Use 2x steps when running several services.
Drop services you do not actually need in a given step.
Frequently asked questions
What causes ""Allocated memory""?
A 1x step has a fixed total. The build container reserves part of it; whatever is left is all the services can share. Requesting more across services overcommits the step.
How do I fix "Allocated memory"?
A 2x step roughly doubles the total memory pool, giving services more room.
Can Latchkey fix this automatically?
Yes. Latchkey runs your GitHub Actions on managed runners that detect this failure, apply the fix, and retry the job automatically - self-healing is on by default.