> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/harness-ai/use-harness-platform/pipelines/failure-handling/timeout-settings.md).

# Timeout settings

Configure timeout settings for steps, stages, and pipelines to prevent excessive execution times.

Timeout settings help prevent steps, stages, and pipelines from running excessively long. For example, this can help end a pipeline naturally if a step enters an endless loop or other long-lasting or infinite failure condition.

***

### What you will learn from this topic

* How to configure [step timeouts](#step-timeouts) to limit step execution time.
* How to configure [stage timeouts](#stage-timeout) to limit stage execution time.
* How to configure [pipeline timeouts](#pipeline-timeouts) to limit overall pipeline execution time.

***

### Before you begin

* **Pipeline permissions:** You must have Edit permissions on pipelines to configure timeout settings. For more information, refer to [Manage roles](/harness-ai/use-harness-platform/platform-access-control/add-manage-roles.md).

***

### Step timeouts

When configuring a step, you can set the step **Timeout** under the **Step Parameters** tab. The default is usually 10 minutes.

![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-75e021eb5c3179968e098cb102dfb514fc521435%2Fstep-timeout.png?alt=media)

Step timeouts mark steps as expired in the following scenarios:

* The step does not complete before the configured timeout.
* The stage or pipeline reaches the stage or pipeline timeout limit when the step is still running.

***

### Stage timeout

Find the stage **Timeout** settings under **Overview** > **Advanced** when configuring your stage.

![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-b1e7748f40b30af8ce0959f759f001f8f68e81f1%2Fstage-timeout.png?alt=media)

Stage timeouts mark stages as expired in the following scenarios:

* The stage does not complete before the configured timeout.
* The pipeline reaches its timeout limit when the stage is still running.

{% hint style="info" %}
When a stage timeout is less than its total step execution time, the failure strategy applied is `EXPIRE_ALL`, preventing rollback. This occurs because child nodes (steps) inherit the expired status from the stage, stopping further execution.
{% endhint %}

***

### Pipeline timeouts

Find the **Pipeline Timeout Settings** under the **Advanced Options** section in the right navbar.

![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-fe65f46f30af2b25aab7e3ebc9f9e084f982d173%2Fpipeline-timeout.png?alt=media)

The pipeline timeout applies to the duration of the entire pipeline. It does not override stage or step timeouts, but stages and steps will timeout if the pipeline timeout limit is hit while a stage or step is running.

{% hint style="warning" %}
**Approvals**

Approval steps and stages can pause execution but they do not stop the pipeline timeout counter. Make sure that the pipeline timeout setting accommodates the time required for approvals.
{% endhint %}

***

### Next steps

* [Define a failure strategy on stages and steps](/harness-ai/use-harness-platform/pipelines/failure-handling/define-a-failure-strategy-on-stages-and-steps.md): Configure automated actions to take when timeouts occur.
* [Runtime inputs](/harness-ai/use-harness-platform/variables-and-expressions/runtime-inputs.md): Use runtime inputs to make timeout values configurable at execution time.

{% @harness-feedback/feedback module="harness-ai" pagePath="harness-ai/use-harness-platform/pipelines/failure-handling/timeout-settings" %}
