GitLab CI "job ... timed out" / exceeded timeout in CI
GitLab terminated the job because it ran longer than the effective timeout (the job's timeout, the project timeout, or the runner's maximum). The job is failed even though the script may have been progressing.
What this error means
The job fails with "ERROR: Job failed: execution took longer than 1h0m0s seconds" (or the configured limit). Output stops at the timeout point.
GitLab Runner
ERROR: Job failed: execution took longer than 1h0m0s secondsCommon causes
The job genuinely runs longer than the limit
A slow build or test suite exceeds the project or job timeout, so GitLab kills it.
The runner caps the timeout below the job
A runner's maximum_timeout overrides a longer job timeout, terminating the job earlier than the YAML suggests.
How to fix it
Raise the timeout or speed up the job
- Set an explicit job
timeoutthat fits the work. - Check the runner's maximum timeout is not capping it lower.
- Or parallelize/cache to bring the job under the limit.
.gitlab-ci.yml
integration:
timeout: 2h
script: ./run-integration.shSplit or parallelize long jobs
Break a monolithic job into parallel shards so each finishes within the timeout.
.gitlab-ci.yml
test:
parallel: 4
script: ./run-shard.sh $CI_NODE_INDEX $CI_NODE_TOTALHow to prevent it
- Set job timeouts that reflect real runtimes.
- Mind the runner
maximum_timeoutceiling. - Parallelize and cache to keep jobs comfortably under the limit.
Related guides
GitLab CI "ERROR: Job failed: exit code 1" in CIFix GitLab "ERROR: Job failed: exit code 1" in CI - a script command returned a non-zero status, so GitLab ma…
GitLab CI "Job failed: exit status 137" (OOM) in CIFix GitLab "ERROR: Job failed: exit status 137" in CI - the job process was killed by the OOM killer (or a ha…
GitLab CI "no space left on device" during job in CIFix GitLab "write ...: no space left on device" in CI - the runner host or container filled its disk during t…