Skip to content

Commit

Permalink
Adding docs for how to override the default HTTP client timeout (#324)
Browse files Browse the repository at this point in the history
* adding docs for the httpclient PR
kedacore/keda#1251

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
  • Loading branch information
arschles committed Jan 19, 2021
1 parent b2a26c8 commit 80b5404
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions content/docs/2.1/operate.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,21 @@ The following metrics are being gathered:
- `keda_metrics_adapter_scaled_object_error_totals`- The number of errors that have occurred for each scaled object
- `keda_metrics_adapter_scaler_errors` - The number of errors that have occurred for each scaler
- `keda_metrics_adapter_scaler_metrics_value`- The current value for each scaler's metric that would be used by the HPA in computing the target average.

## HTTP Timeouts

Some scalers issue HTTP requests to external servers (i.e. cloud services). Each applicable scaler uses its own dedicated HTTP client with its own connection pool, and by default each client is set to time out any HTTP request after 3 seconds.

You can override this default by setting the `KEDA_HTTP_DEFAULT_TIMEOUT` environment variable to your desired timeout in milliseconds. For example, on Linux/Mac/Windows WSL2 operating systems, you'd use this command to set to 1 second:

```shell
export KEDA_HTTP_DEFAULT_TIMEOUT=1000
```

And on Windows Powershell, you'd use this command:

```shell
$env:KEDA_HTTP_DEFAULT_TIMEOUT=1000
```

All applicable scalers will use this timeout. Setting a per-scaler timeout is currently unsupported.

0 comments on commit 80b5404

Please sign in to comment.