> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/error-codes/mariadb-error-codes-1200-to-1299/e1203.md).

# Error 1203: User already has more than 'max\_user\_connections' active connections

| Error Code | SQLSTATE | Error                            | Description                                                               |
| ---------- | -------- | -------------------------------- | ------------------------------------------------------------------------- |
| 1203       | 42000    | ER\_TOO\_MANY\_USER\_CONNECTIONS | User %s already has more than 'max\_user\_connections' active connections |

## Possible Causes and Solutions

The account already has as many sessions open as the global [max\_user\_connections](/docs/server/server-management/variables-and-modes/server-system-variables.md#max_user_connections) system variable allows. The variable applies to every account that has no `MAX_USER_CONNECTIONS` limit of its own. Accounts with the [CONNECTION ADMIN](/docs/server/reference/sql-statements/account-management-sql-statements/grant.md#connection-admin) privilege aren't affected. When `max_user_connections` is `-1`, every other account without its own limit gets this error at its first connection.

If the account has its own limit, set with the `MAX_USER_CONNECTIONS` [resource limit option](/docs/server/reference/sql-statements/account-management-sql-statements/create-user.md#resource-limit-options), that limit replaces the global one, and reaching it gives [error 1226](/docs/server/reference/error-codes/mariadb-error-codes-1200-to-1299/e1226.md) instead.

```sql
SET GLOBAL max_user_connections = 1;
```

A second session of an account without its own limit then fails:

```
ERROR 1203 (42000): User app already has more than 'max_user_connections' active connections
```

To solve the error:

* Close sessions that the account no longer uses, or let the application share connections through a pool.
* Raise the limit with `SET GLOBAL max_user_connections = …`, or set it to `0` for no limit. If the server was started with `max_user_connections=0`, the variable can't be changed at runtime, and `SET GLOBAL` fails with error 1290.
* Give the account its own limit, for example `ALTER USER 'app'@'%' WITH MAX_USER_CONNECTIONS 20;`.

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}
