Azure Pipelines "ran longer than the maximum time" Timeout
The job exceeded its configured (or default) maximum time, so Azure Pipelines canceled it. The work was still running when the limit hit.
What this error means
The job is canceled with "The job running on agent X ran longer than the maximum time of N minutes." It often only happens on slow runs.
azure-pipelines
##[error]The job running on agent Hosted Agent ran longer than the
maximum time of 60 minutes. For more information, see https://go.microsoft.com/fwlinkCommon causes
Work genuinely too slow
A build or test step ran past the limit on a slow agent or under load.
A hung step
A command waiting on input or deadlocked never returns.
Limit set too low
timeoutInMinutes does not allow headroom for variance.
How to fix it
Raise or scope the timeout
- Set a realistic timeoutInMinutes on the job.
- Split very long jobs into stages.
azure-pipelines.yml
jobs:
- job: integration
timeoutInMinutes: 90Remove hangs
- Run commands non-interactively and add per-step timeouts.
How to prevent it
- If you run on GitHub Actions, self-healing managed runners such as Latchkey auto-retry transient failures, so a one-off slow run does not fail the job. On Azure DevOps, right-size timeoutInMinutes per job.
Related guides
Azure Pipelines "We stopped hearing from agent" Lost CommunicationFix the Azure Pipelines "We stopped hearing from agent" error where the service lost communication with the a…
Azure Pipelines Out of Memory / Agent Process KilledFix the Azure Pipelines out-of-memory failure where a build step or the agent was killed because the host ran…
Azure Pipelines "All potential agents are in use" WaitFix the Azure Pipelines wait where "all potential agents are in use" because the self-hosted pool has no free…