Add PgBouncer to dev and PgBouncer stats to admin Infra page

- Add pgbouncer service to docker-compose-dev.yml with dev config
- Route DATABASE_URL through pgbouncer:6432 in dev (matches prod)
- Add PgBouncer pools and stats tables to /admin/infra with color-coded
  avg query/xact times and client waiting indicators
- php, messenger, cron now depend on pgbouncer instead of database directly

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Serreau Jovann
2026-03-26 10:33:51 +01:00
parent 1a336edac5
commit 74c10a60f5
7 changed files with 204 additions and 5 deletions

View File

@@ -0,0 +1,19 @@
[databases]
e_ticket = host=database port=5432 dbname=e_ticket
[pgbouncer]
listen_addr = 0.0.0.0
listen_port = 6432
auth_type = md5
auth_file = /etc/pgbouncer/userlist.txt
pool_mode = transaction
max_client_conn = 200
default_pool_size = 20
min_pool_size = 5
reserve_pool_size = 5
reserve_pool_timeout = 3
server_lifetime = 3600
server_idle_timeout = 600
log_connections = 0
log_disconnections = 0
ignore_startup_parameters = extra_float_digits

View File

@@ -0,0 +1 @@
"app" "md56a422f785c9e20873908ce25d1736ae2"