Skip to content
Latchkey

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 seconds

Common 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

  1. Set an explicit job timeout that fits the work.
  2. Check the runner's maximum timeout is not capping it lower.
  3. Or parallelize/cache to bring the job under the limit.
.gitlab-ci.yml
integration:
  timeout: 2h
  script: ./run-integration.sh

Split 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_TOTAL

How to prevent it

  • Set job timeouts that reflect real runtimes.
  • Mind the runner maximum_timeout ceiling.
  • Parallelize and cache to keep jobs comfortably under the limit.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →