"Exceeded the maximum execution time of 360 minutes": GitHub Actions timeouts, and jobs that finish in time
"The job running on runner GitHub Actions 2 has exceeded the maximum execution time of 360 minutes" means GitHub cancelled the job after 6 hours, the most a job on a GitHub-hosted runner can run. The same message with a smaller number means your own timeout-minutes stopped it. The fix depends on which job you have: one that hangs needs a short timeout and the step that hangs found; one that really needs 6 hours needs to be split, cached, or run on a faster machine.
Skipbox runs the long job on up to 16 vCPU and 32 GB with its caches kept between jobs, for a flat price with unlimited minutes, so the same work finishes in less of its 6 hours.
GitHub's time limits
| Limit | GitHub-hosted runner | Self-hosted runner | What happens at the limit |
|---|---|---|---|
| One job | 6 hours | 5 days | The job is cancelled and fails |
timeout-minutes not set | 360 minutes | 360 minutes | The job is cancelled |
| Waiting in the queue | 24 hours | 24 hours | The job is cancelled |
| One workflow run | 35 days | 35 days | The run is cancelled |
GITHUB_TOKEN | Expires when the job ends | At most 24 hours | Steps that call GitHub's API fail |
GitHub's figures are from its Actions limits and workflow syntax pages. The 6 hours count from when a runner picks the job up: time in the queue isn't part of them.
Set a timeout on every job
Without timeout-minutes, a job that hangs runs for 360 minutes and you pay for all of them on a private repository. Set each job's timeout to two or three times its normal time:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- run: npm ci
- name: Integration tests
timeout-minutes: 15
run: npm run test:integration
- Job:
jobs.<job_id>.timeout-minutescancels the whole job. - Step:
steps[*].timeout-minuteskills one step's process; withcontinue-on-error: truethe job goes on. - One command:
timeout 10m ./run-e2e.shstops a single command inside a script and exits with 124, so the log says which command it was.
Find the step that hangs
A job that takes 20 minutes on a good day and 6 hours on a bad one is waiting for something. Open the log of the cancelled run and read the last lines printed before it went quiet. The usual causes:
| What the log shows last | What is waiting | Fix |
|---|---|---|
A question ([Y/n], Do you want to continue?) | A command asking for input nobody gives | -y, --yes, DEBIAN_FRONTEND=noninteractive, --non-interactive |
| A server's "listening on" or "ready" line | A server started in the foreground | Start it with & or docker compose up -d, then wait for its port with a timeout |
| A test that started and never finished | A test waiting for a database or service that never came up | A health check on the service, and a per-test timeout |
| Steps getting slower, then nothing | The machine is out of memory and swapping | Fewer parallel workers, or a machine with more memory |
| Nothing at all after the runner line | The runner lost its connection or the VM went down | See the shutdown signal guide |
To look inside a job while it hangs, mxschmitt/action-tmate opens an SSH session into the runner at the step you put it.
Make a long job fit in 6 hours
When the job really needs the time, three things shorten it.
Split it
Run the test suite in shards with a matrix, so each shard is its own job with its own 6 hours:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
shard: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v4
- run: npx playwright test --shard=${{ matrix.shard }}/4
For a build that can't be split, save its output between jobs with actions/upload-artifact and actions/download-artifact, and let the next job pick up where the last one stopped.
Stop rebuilding what didn't change
A job that downloads every dependency and builds every Docker layer from nothing spends much of its time redoing the last run. actions/cache saves part of it, within GitHub's 10 GB per repository, and restoring a large cache takes minutes of its own. See the Docker layer cache guide and the cache size limit guide.
Run it on a faster machine
A private repository's ubuntu-latest has 2 cores. A compile, a test suite or a Docker build that uses every core finishes sooner on more of them. GitHub's larger runners have more cores, are billed per minute on GitHub Team and Enterprise Cloud, and keep the same 6-hour limit.
Skipbox: more cores, and the caches already there
runs-on | Machine | Plan, per month |
|---|---|---|
skipbox | 4 vCPU, 16 GB | S, $39 |
skipbox-8x16 | 8 vCPU, 16 GB | M, $79 |
skipbox-16x32 | 16 vCPU, 32 GB | L, $149 |
- The caches stay. Each plan is a machine kept for your account: Docker images and layers, package caches and the tool cache are on its disk when the next job starts, with nothing to restore.
- Minutes are unlimited. A long job costs the same flat price as a short one, and runs outside your GitHub Actions budget.
- The same limit, used less. A Skipbox job can run for up to 6 hours, and
timeout-minutesworks as on any runner. - Measured in public. The benchmark runs open-source projects' own jobs on GitHub's runner and on Skipbox, with every run's log on GitHub.
Moving a job is one line:
jobs:
build:
runs-on: skipbox-16x32 # was ubuntu-latest
timeout-minutes: 120
- Sign in to Skipbox with GitHub.
- Install the Skipbox GitHub App and pick the repositories.
- Change
runs-onand push.
Try it on the job that runs out of time
You can try it on your own jobs first: free for 7 days, no minute cap.
Move the job that hits the limit to runs-on: skipbox and compare its second run with its last run on GitHub. Check what your minutes cost now in the calculator on the home page.
FAQ
What is the maximum time a GitHub Actions job can run?
6 hours (360 minutes) on a GitHub-hosted runner, and 5 days on a self-hosted runner, per GitHub's Actions limits page. A whole workflow run can last up to 35 days, and a job can wait in the queue for 24 hours before GitHub cancels it.
What is the default timeout-minutes in GitHub Actions?
- GitHub's workflow syntax gives jobs.<job_id>.timeout-minutes a default of 360, so a job that hangs without one runs, and is billed, for 6 hours before GitHub cancels it. Set it to about two or three times the job's normal time.
How do I set a timeout for one step?
Put timeout-minutes on the step: GitHub kills the step's process when it runs longer. It takes a positive whole number of minutes. For one command inside a script, the shell's timeout works too: timeout 20m npm test.
Can a GitHub-hosted job run longer than 6 hours?
No. A larger timeout-minutes doesn't lift the 6-hour limit on GitHub's runners. Split the work into jobs that each fit, save the work between them, or make the job faster: more cores and caches that are already there.
Why does my job take 6 hours when it normally takes 20 minutes?
Something is waiting: a command asking a question nobody answers, a server started in the foreground, a test waiting for a service that never came up, or a machine short of memory. With no timeout-minutes the job sits there until GitHub's 360 minutes run out. Set a timeout, then read the last lines the log printed before it stopped.
Does Skipbox let a job run longer?
A Skipbox job can run for up to 6 hours, as on GitHub's runners, and it finishes sooner: up to 16 vCPU and 32 GB, with Docker layers and package caches kept on your account's machine between jobs. The benchmark of open-source projects' own jobs is public, with every run's log.
Updated November 25, 2026