# FATAL: too many connections for role "x"

**Code:** `connection limit for role` · **Category:** PostgreSQL · **Seen on:** PostgreSQL

The role reached its per-role CONNECTION LIMIT (often set by hosting providers or free tiers).

## Meaning

Different from max_connections: this cap applies to one role. Free database tiers set small limits.

## Common causes

- Role connection limit reached
- Pools too large for the plan
- Leaked connections

## Quick fix

1. Reduce pool size
2. Use the provider’s pooler
3. Raise the role limit if you control it: ALTER ROLE app CONNECTION LIMIT 50

## Detailed fix by platform

### PostgreSQL

1. `SELECT rolname, rolconnlimit FROM pg_roles WHERE rolname = 'app';`

## How to diagnose

1. **Limit** — rolconnlimit?
2. **Usage** — count in pg_stat_activity

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/postgresql/too-many-connections-for-role)
