Bitbucket Pipeline Exceeded Build Time Limit
Quick answer
A Pipelines step is killed after 120 minutes by default. Find the slow command, add caching, split the step or set a shorter max-time to fail earlier.
Most likely fix: Find what hangs
How to fix it
Try these in order — the most common fix is first.
1. Find what hangs
- Add timestamps to the logs and check the last command that ran
- Run it locally
Did this fix it?2. Speed up the step
- Use caches
- Split the step into smaller steps
- Use a larger size only if memory bound
Did this fix it?3. Set max-time
- Set max-time on the step in bitbucket-pipelines.yml so hung builds fail early and use fewer minutes
Did this fix it?
Symptoms
Step fails with 'Exceeded build time limit' after a long run.
Why it happens
- Default maximum step time is 120 minutes
- Hanging docker build or test
- No dependency caching
This guide also covers
- bitbucket pipeline exceeded build time limit
- bitbucket pipelines timeout
Still not working?
If Bitbucket keeps failing, you're not alone. See every Bitbucket problem users report or the alternatives people switch to.
Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.
Talk to us