mirror of
https://github.com/zitadel/zitadel.git
synced 2025-10-08 19:21:32 +00:00

# Which Problems Are Solved - `pgxpool -> pgx` dependency throws "MaxSize must be >= 1" on init if `postgres.MaxOpenConns` isn't set in the ZItadel config # How the Problems Are Solved Only override the `MaxConns` with the Zitadel configured `MaxOpenConns` if greater than 0 (default value). The default `MaxConns` [is derived by `pgxpool`](ea9610f672/pgxpool/pool.go (L309-L324)
) itself in a sensible way, but somewhat undocumented: checks for explicit config in connection url or config and falls back on max(num_cpus, 4). # Additional Changes Applied same check in cockroach config # Additional Context This is likely a regression from the changes in https://github.com/zitadel/zitadel/pull/8325 (cherry picked from commite009ed9fe4
)