GET /api/v1/databases/{id}/connection-limits reports the observed
serverConnectionCap, desiredServerConnectionCap,
effectiveServerConnectionCap, generation, policyVersion, and
operationStatus. allowedServerConnectionCap gives min, max and
planMax for this database: the default and maximum come from your plan
(Free 2/4, Pro 3/12, Business 4/24), and an existing cap above planMax is
kept as max until you lower it.
enforcement is pgbouncer_database_alias, and classification is
admission_cap. The cap is shared by all roles and PgBouncer pools for that
database. It is not a hard CPU, memory, disk, or client connection quota.
The readback also includes currentServerConnections, waitingClients, and
usageNearCap from a current PgBouncer pool sample. These fields are null
when telemetry is unavailable; zero means the alias has no active server pool.
The dashboard warns at 80% of the effective server cap or when clients are
waiting. This is observed usage, not a guarantee of spare CPU, memory, or disk.
preparedStatementProtocolLimit reports the loaded PgBouncer instance setting
and preparedStatementScope is pgbouncer_instance_protocol. It supports
protocol-level named prepared statements across transaction pooling; the
setting applies to the whole PgBouncer instance and is not a per-database
control. SQL PREPARE surviving transaction boundaries is not promised.
An account owner can request an adjustment with an API key that can write to
the database:
The dashboard provides the same change with one confirmation. In the CLI,
use
dbhost databases limits <id> and
dbhost databases limits-set <id> <cap> --idempotency-key KEY. See
Connection limits and timeouts.
GET returns allowedServerConnectionCap with the range you can request.
Caps above 8 through the CLI need CLI 0.3.8 or newer.