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.
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.
integration:
timeout: 2h
script: ./run-integration.shSplit or parallelize long jobs
Break a monolithic job into parallel shards so each finishes within the timeout.
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.