Skip to content

v0.36.0

Release Date: 2026-11-21

SystemAuth's PostgreSQL pool held up to 20 connections, with no way to change it. On a shared server, where each database role has a CONNECTION LIMIT below 20, a busy SystemAuth could ask for more connections than its role allows and fail with "too many connections for role". The pool size is now configurable.

Database pool size

  • database.max_open_conns. Caps the PostgreSQL pool. Set it to the database role's connection limit, or below, and a busy server waits for a free connection instead of failing.
  • Unchanged without it. Unset or zero keeps the pool at 20, with up to five connections idle. A smaller pool keeps at most that many idle.
  • Checked. A negative value is a configuration error, and the configuration schema lists the key.
  • DatabaseConfig.OpenConns and DefaultMaxOpenConns give the effective pool size to a host that needs it.

SQLite ignores the setting. See Database connections.

The release adds no breaking change.

Upgrading

On a role with a connection limit, set the pool to match:

database:
  driver: postgres
  dsn: ${DATABASE_URL}
  max_open_conns: 10   # the role's CONNECTION LIMIT, or below

With several instances on one role, keep their pools' total within the limit.