---
url: /process-functions/web-setconnectiontimeout.md
description: Sets how long a web request waits to connect before timing out.
---

# web.setConnectionTimeout

Sets how long a web request waits to connect before timing out. It doesn't limit the transfer once connected. Defaults to 120 seconds.

If the timeout is reached before a connection is made, the request is stopped and an error is returned.

```js
web.setConnectionTimeout(seconds)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `seconds` | `number` | The seconds to wait. |

## Examples

```js
web.setConnectionTimeout(60); // Set connection timeout to 60 seconds
```

## Related

* [web.setReadTimeout](/process-functions/web-setreadtimeout)
* [web.setWriteTimeout](/process-functions/web-setwritetimeout)
* [web.setTransferTimeout](/process-functions/web-settransfertimeout)
