S
Supanote
Sign in Sign up

Production PgBouncer Transaction Connection Pooling Config

plain (ini) 13 hours ago · 33 lines · 6 views
1;; Production PgBouncer Configuration
2[databases]
3app_db = host=127.0.0.1 port=5432 dbname=app_production auth_user=postgres
4
5[pgbouncer]
6logfile = /var/log/postgresql/pgbouncer.log
7pidfile = /var/run/postgresql/pgbouncer.pid
8listen_addr = 0.0.0.0
9listen_port = 6432
10auth_type = scram-sha-256
11auth_file = /etc/pgbouncer/userlist.txt
13;; Connection Pool Mode (transaction mode for stateless apps)
14pool_mode = transaction
16;; Connection Limits
17max_client_conn = 5000
18default_pool_size = 50
19min_pool_size = 10
20reserve_pool_size = 10
21reserve_pool_timeout = 5.0
22max_db_connections = 200
24;; Timeouts and Keepalive
25server_idle_timeout = 600
26client_idle_timeout = 0
27server_connect_timeout = 15
28server_login_retry = 15
29tcp_keepalive = 1
30tcp_keepcnt = 3
31tcp_keepidle = 30
32tcp_keepintvl = 10

No replies yet

Every reply is a note. Start a discussion, ask a question, or attach a code snippet.

Share Note

Download SVG
Social Card Preview
Open on mobile
Point your phone camera to open this note directly

Report this note

Notification