> Markdown version of https://tuna.am/en/docs/troubleshooting/errors/token-limit-reached/. Documentation index: [llms.txt](https://tuna.am/en/llms.txt), full text in one file: [llms-full.txt](https://tuna.am/en/llms-full.txt). Any page is available as Markdown: append `.md` to its URL without the trailing slash.

# Token limit reached: active tunnels

```text
FATA[12:00:00] Failed to get connection settings: Token limit reached: active tunnels
  Code: BadRequest
  Request ID: 7a2e9c05f4b1d863e0a7c2f95b4d1e38

```

Variants of the message:

```text
Token limit reached: created tunnels
TCP tunnels are not allowed for this token
HTTP tunnels are not allowed for this token

```

tuna CLI and Tuna Desktop show this error when you start a tunnel. The client doesn't reconnect and exits right away.

## Cause

The tunnel was started with an API key that got restrictions when it was created. These are limits of the key, not of your plan:

* `Token limit reached: active tunnels` means the key is already running as many tunnels at once as it's allowed;
* `Token limit reached: created tunnels` means the key has already created as many tunnels as it's allowed over its lifetime. Stopping tunnels doesn't decrease this counter;
* `TCP tunnels are not allowed for this token` and `HTTP tunnels are not allowed for this token` mean the key isn't allowed to start this type of tunnel.

Such restrictions apply to [API keys](https://my.tuna.am/api_keys?lang=en) created with limits, temporal tokens from [Terraform](https://tuna.am/en/docs/guides/terraform.md#scenario-temporal-tunnels-for-ci), [background service keys](https://tuna.am/en/docs/tunnels/guides/service.md#service-key), and [Kubernetes operator](https://tuna.am/en/docs/tunnels/guides/kubernetes-operator.md#security) tokens. A service key and an operator token start tunnels of one type only: HTTP or TCP.

## What to do

1. Check which key started the tunnel: the `--api-key` flag, the `TUNA_API_KEY` variable, or a key saved with `tuna login --with-api-key`.
2. For `active tunnels`, stop the tunnels started with this key. The list of active tunnels is in the [dashboard](https://my.tuna.am/tunnels?lang=en).
3. For `created tunnels`, issue a new key: the counter of created tunnels doesn't reset.
4. For a blocked protocol, start the tunnel with a key that allows this type, or issue a new key. For a background service of a different type, create a separate service.
