> ## Documentation Index
> Fetch the complete documentation index at: https://formbricks.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# AI timeouts

> Give slow models more time and check proxy limits.

Local models can take longer to generate a response, especially through a tunnel or gateway. Set
`AI_TIMEOUT_MULTIPLIER` to give every web app AI operation more time. It accepts numbers from `1` to `10`,
including decimals such as `1.5`. The default is `1`; leaving it unset or blank preserves today's limits.
Invalid values prevent the app from starting.

| Operation | Default | With `AI_TIMEOUT_MULTIPLIER=3` |
| - | - | - |
| AI chart creation | 30 seconds | 90 seconds |
| Survey generation, translation, example responses, and each QSF AI call | 45 seconds | 135 seconds |
| Complete QSF import | 120 seconds | 360 seconds |

The call budget includes retries. QSF attempts share their call's budget and are also limited by the remaining
import deadline; five seconds remain reserved for assembling the draft. The setting applies to every AI
provider configured for the web app. Hub and taxonomy have their own configuration, and OAuth token requests
retain their separate ten-second timeout.

**1. Set the multiplier**

For Docker Compose, add this to `docker/.env`:

```bash theme={null}
AI_TIMEOUT_MULTIPLIER=3
```

For Helm, set the application environment in your values:

```yaml theme={null}
deployment:
  env:
    AI_TIMEOUT_MULTIPLIER: "3"
```

**2. Apply the environment change**

From the Docker Compose directory, recreate the app container so it reads the updated environment:

```bash theme={null}
docker compose up -d --force-recreate formbricks
```

For Kubernetes, apply your Helm values with your usual upgrade command and let the app pods restart.

**3. Verify a slow operation**

Generate a survey or translate one against your model and confirm it finishes. Pressing **Stop** during
survey generation still cancels the model request immediately. To restore the default limits, set the
multiplier to `1` and apply the environment change again.

> [!NOTE]
>
> Your ingress, reverse tunnel, gateway, and model server can impose shorter limits. Increase those limits
> as needed: non-streaming operations may send no response until generation finishes. Survey generation and
> QSF imports send a keepalive after ten seconds of silence, but that does not override a proxy's maximum
> request duration or a provider's own timeout.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.