Guides
How to handle long-running jobs
Some jobs run for hours and occasionally hit the six-hour limit.
5 min read
Some jobs run for hours and occasionally hit the six-hour limit.
Why it happens
Work that should be sharded is running serially, and the default job timeout is too permissive to catch a hang.
How to fix it
- Shard the work across a matrix so each leg finishes in a reasonable time
- Set timeout-minutes deliberately on every job
- Checkpoint long work to an artifact so a retry does not start over
- Move genuinely long batch work out of CI and onto scheduled infrastructure
Your next build could be twice as fast, at half the price
Start free. Migrating away is the same one line, and we publish that diff too.
Related
How to speed up GitHub ActionsYour pipeline takes longer than anyone wants to wait, and it is not obvious where the time goes.How to find the slow step in a workflowThe pipeline is slow but every individual step looks reasonable.How to reduce GitHub Actions cold startsJobs sit for 30 to 90 seconds before the first step runs.How to diagnose GitHub Actions queue timesJobs are queued for minutes before a runner picks them up.