timeout-minutes being ignored?

I’ve noticed more than expected consumption of my organization’s GitHub Actions monthly minutes for the past few days.  Today I found what I believe to be the cause.

We don’t explicitly set timeout-minutes in our config, but it defaults to 360 minutes according to the documentation.  Why did it take 72 hours for GitHub Actions to terminate this build?

@chingc ,

There are few notes need you pay attention to:

  1. When using GitHub-hosted runner to run jobs in the workflow, each jobs can run for up to 6 hours (360 minutes) of execution time, , but this limit does not apply to self-hosted runners.

  2. Each workflow run is limited to 72 hours. If a workflow run reaches this limit, the workflow run is cancelled. This limit also applies to self-hosted runners.

According above two points, the below situations (including but not limited to) will let the workflow run be matked as timed out after 72 hours:

  1. When using GitHub-hosted runners to run some performed sequentially jobs (at least 12) in the workflow, and the total run time of the jobs reaches 72 hours.

  2. When using self-hosted runners to run jobs (at least 1) in the workflow, one of the job run is stuck and finally make the run time of the workflow run reaches 72 hours.

More details about the limits of time-out, you can reference here: https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits

1 Like

I just got the error:

The job running on runner runner-1 has exceeded the maximum execution time of 360.

On a self-hosted runner.

You actually need to set `jobs.JOB_UID.minutes" to change the default 360 minute timeout.

More information here: https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes