> For the complete documentation index, see [llms.txt](https://docs.bugbug.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bugbug.io/preventing-failed-tests/timeout.md).

# Timeout

Discover effective strategies to prevent failed tests due to timeouts. Learn how to optimize your test environments and code execution for smooth test runs.

BugBug will not immediately fail the test if it can't click an element right away (or do any other interaction or assertion).

By default, it will wait for 30 seconds and reattempt to run the test step and hold until [waiting conditions](/preventing-failed-tests/waiting-conditions.md) are met. If it was not possible to continue the test after such time, the test will be marked as failed.

## Configure global timeout

You configure the timeout waiting time in Project settings.

Increase the timeout if your page is slow or fails in the cloud.

Decrease the default timeout if you don't want to wait 30 seconds for failed tests results.

Increase the timeout for cloud runs if your [local runs are passed but cloud runs fail](/troubleshooting/cloud-tests-sometimes-failing.md).

<figure><img src="https://3168433179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKixgeBPbLvnD0l1eiV%2Fuploads%2Fy61oTf1lc2SGoV7n09ki%2FScreen%20Shot%202022-11-24%20at%2013.20.21.png?alt=media&amp;token=d51b1216-f10d-4b8d-8589-2fe568196d7b" alt=""><figcaption></figcaption></figure>

## Change timeout for individual steps

You can override the timeout for each step separately

![](https://3168433179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKixgeBPbLvnD0l1eiV%2Fuploads%2FdkUGZF5M3AI7PAIScCTi%2FScreenshot%202022-04-11%20at%2019.22.39.png?alt=media\&token=969ce483-dc8e-4263-ad9d-c5aff531a9ea)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.bugbug.io/preventing-failed-tests/timeout.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
