Documentation / Troubleshooting / Timeout Issues

Timeout Issues

Jobs that exceed the time limit and how to fix them.

Timeout Limits by Execution Mode

V8 Isolation Mode runs-on: worker-run

Each step has a default timeout of 120 seconds (2 minutes). If a step does not complete within this window, it is marked as failed and the job will fail as well, unless the step has continue-on-error: true configured.

Container Mode runs-on: worker-run/instance-type=lite

Container mode runs in a full Ubuntu environment. Overall job time limits may apply depending on your plan. For long-running tasks such as builds, test suites, or deployments, container mode is the recommended choice.

Common Causes (V8 Isolation Mode)

Tips to Avoid Timeouts

  1. 1

    Keep scripts focused

    Each job should have one responsibility. If you need multiple API calls, split them into separate jobs.

  2. 2

    Avoid pagination loops over large datasets

    Iterating over thousands of issues, comments, or commits can easily exceed the timeout. Filter your queries to only fetch what you need.

  3. 3

    Use core.setFailed() early

    If you detect an error condition in a Node.js action, fail the job immediately with core.setFailed() rather than letting the script continue until timeout.

  4. 4

    Split complex workflows into multiple jobs

    Use the "needs:" keyword to chain multiple focused jobs together instead of running everything in a single job.

  5. 5

    Use continue-on-error for non-critical steps

    Add continue-on-error: true to a step to prevent a timeout from failing the entire job. The step will be marked as failed but the job will continue to the next step.

  6. 6

    Use container mode for long-running tasks

    If your workflow requires heavy computation or long-running processes, use container mode (runs-on: worker-run/instance-type=lite or basic) which is better suited for resource-intensive tasks.

Tip: The 120-second per-step limit in V8 isolation mode is designed for lightweight automation tasks. If your workflow requires longer-running steps, switch to container mode (runs-on: worker-run/instance-type=lite) for a full Ubuntu environment better suited to builds, test suites, and other resource-intensive work. You can also add continue-on-error: true to individual steps to prevent a timeout from failing the entire job.