Skip to content
Latchkey

CI "The job exceeded the maximum execution time"

The runner hit the overall job time limit and was terminated. Either the work genuinely takes too long, or a slow/stalled infra step (slow download, hung service) pushed it over.

What this error means

The job ends with The job exceeded the maximum execution time and was terminated. If a transient slowdown caused it, a re-run finishes in time; if the work is genuinely too long, you must split or speed it up.

github-actions
##[error] The job running on runner GitHub Actions 2 has exceeded the maximum execution time of 360 minutes.

Common causes

A transient slowdown ate the time budget

A slow download, throttled registry, or a stalled service made an otherwise normal job run long.

The work genuinely exceeds the limit

A large build/test matrix simply needs more time than the configured ceiling.

How to fix it

Speed up or split the job

  1. Cache dependencies and build outputs to cut runtime.
  2. Split a monolithic job into parallel jobs.
  3. Raise timeout-minutes if the work legitimately needs longer.

Find what consumed the time

Time the steps to see whether infra or work dominated.

shell
# wrap slow steps to measure them
/usr/bin/time -v ./run-tests.sh

How to prevent it

  • Cache aggressively to keep jobs fast.
  • Set realistic timeout-minutes per job.
  • When a transient infra slowdown causes the overrun, managed runners detect the mechanical blip and automatically retry, so a one-off slow run does not fail the build.

Frequently asked questions

What causes "Job exceeded max time"?
A slow download, throttled registry, or a stalled service made an otherwise normal job run long.
How do I fix Job exceeded max time?
Speed up or split the job
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.

Related guides

References

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