> For the complete documentation index, see [llms.txt](https://docs.vdo.ninja/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vdo.ninja/advanced-settings/settings-parameters/and-peerrecoversteps.md).

# \&peerrecoversteps

General Option! ([`&push`](/advanced-settings/setup-parameters/push.md), [`&room`](/advanced-settings/setup-parameters/room.md), [`&view`](/advanced-settings/mixer-scene-parameters/view.md), [`&scene`](/advanced-settings/mixer-scene-parameters/scene.md), [`&director`](/advanced-settings/director-parameters/director.md))

## Aliases

* `&p2precoversteps`

## Options

Example: `&peerrecoversteps=4`

| Value   | Description                  |
| ------- | ---------------------------- |
| Integer | Max number of recovery steps |

## Details

* Default is `3`.
* Allowed range is clamped to `1` through `6`.
* Higher values allow more retries before the peer is closed/rebuilt.
* Lower values fail fast and rely on fresh reconnection sooner.

Current recovery ladder (simplified):

1. Attempt ICE restart.
2. If auto-relay is eligible, force relay and rotate the TURN order while preserving the PC's other RTC settings; then attempt one ICE restart.
3. Additional attempts continue up to the configured step limit; with `&autorecover` and WHIP/WHEP configured, auto-fallback signaling may be attempted for eligible peers.

A hard `connectionState=failed` event uses a bounded version of this ladder: step 1 immediately, step 2 once after the recovery window, then close after one more unsuccessful window. Higher values do not add more hard-failure attempts; `&peerrecoversteps=1` explicitly prevents step 2.

## Usage examples

* Balanced default-like behavior: `?room=show123&peerrecoversteps=3`
* Very persistent recovery: `?room=show123&autorecover=1&peerrecoversteps=6`

## Related

{% content-ref url="/pages/RXoyUCs4znWVHC6X5eLP" %}
[\&p2pfailtimeout](/advanced-settings/settings-parameters/and-p2pfailtimeout.md)
{% endcontent-ref %}

{% content-ref url="/pages/zGrl2B1uV4Vm3OkTolja" %}
[\&autorecover](/advanced-settings/settings-parameters/and-autorecover.md)
{% endcontent-ref %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.vdo.ninja/advanced-settings/settings-parameters/and-peerrecoversteps.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
