# GitHub Actions: The job running on runner GitHub Actions 12 has exceeded the maximum execution time of 360 minutes

**Code:** `exceeded the maximum execution time` · **Category:** CI/CD · **Seen on:** GitHub Actions

A job ran longer than its time limit — your `timeout-minutes`, or the 6-hour (360 minute) platform limit — and was cancelled.

## Meaning

Most such jobs are not slow but stuck: a test waiting for input, a hung network call, an unfinished background process, or a missing `--yes` flag. Set a sensible `timeout-minutes`, add timeouts to commands, and look at the last log lines to see where it stopped.

## Common causes

- A command waiting for interactive input
- Hanging network call or deadlocked test
- Background process keeping the step alive
- Legitimately long job on a small runner
- Matrix leg or service container never becoming healthy

## Quick fix

1. Add `timeout-minutes: 15` to jobs/steps so hangs fail fast
2. Use `timeout 10m cmd` and non-interactive flags (`-y`, `--yes`)
3. Split long work or use a larger runner

## Detailed fix by platform

### GitHub Actions

1. `timeout-minutes` can be set on the job or on a single step
2. Add `--no-input` / `CI=true` to tools that prompt

## Code examples

### Fail fast on hangs

```yaml
jobs:
  test:
    runs-on: ubuntu-latest
    timeout-minutes: 20
    steps:
      - name: Integration tests
        timeout-minutes: 10
        run: timeout 9m npm run test:integration
```

## How to diagnose

1. **Last log** — Where did output stop?
2. **Prompt** — Anything waiting for input?
3. **Limit** — timeout-minutes set?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/cicd/gha-job-exceeded-max-execution-time)
