openvibers/openvibe.host Commits

Data role: PostgreSQL max_connections 200 and smaller PgBouncer pools (5 per database, cap 10, idle server connections closed after 60 s) (#34)

OP OpenVibers committed 8 Oct 2026 · 1e59a52979 · 2 files, +8 −4

Changes

ddiff --git a/roles/data/files/pgbouncer.ini b/roles/data/files/pgbouncer.ini
iindex 5796d5c..5a5c3dc 100644
---- a/roles/data/files/pgbouncer.ini
++++ b/roles/data/files/pgbouncer.ini
@@@ -14,11 +14,14 @@ auth_dbname = postgres
auth_query = SELECT usename, passwd FROM pgbouncer.get_auth($1)
pool_mode = transaction
max_client_conn = 2000
--default_pool_size = 10
++; Pools are per database/user and ~30 services share one PostgreSQL (max_connections 200): small pools, idle server
++; connections closed after a minute, and a per-database cap, so no burst can take every server slot (2026-10-08: a
++; boot-time migration on the direct URL found none left). A busy database can get its own pool_size under [databases].
++default_pool_size = 5
min_pool_size = 0
reserve_pool_size = 2
--max_db_connections = 20
--server_idle_timeout = 300
++max_db_connections = 10
++server_idle_timeout = 60
query_wait_timeout = 30
ignore_startup_parameters = extra_float_digits,options,application_name
stats_users = ov_monitor
ddiff --git a/roles/data/files/postgresql-openvibe.conf b/roles/data/files/postgresql-openvibe.conf
iindex 81ffa8e..23d6026 100644
---- a/roles/data/files/postgresql-openvibe.conf
++++ b/roles/data/files/postgresql-openvibe.conf
@@@ -2,7 +2,8 @@
# Sized for the shared host (4 vCPU, 15 GB RAM) until the data role has its own machine; revisit then.
listen_addresses = '127.0.0.1' # the private network address is added when a second host joins (WS-X1)
port = 5432
--max_connections = 120 # applications connect through PgBouncer (transaction pooling)
++max_connections = 200 # applications connect through PgBouncer (transaction pooling); 120 ran out on 2026-10-08
++ # (~30 databases × idle server connections) and boot-time migrations on the direct URL failed
password_encryption = scram-sha-256
shared_buffers = 1GB