50 lines
No EOL
1.2 KiB
YAML
50 lines
No EOL
1.2 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: pgbouncer-config
|
|
namespace: aprs
|
|
data:
|
|
pgbouncer.ini: |
|
|
[databases]
|
|
aprs = host=postgis port=5432 dbname=aprs
|
|
|
|
[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 = 1000
|
|
default_pool_size = 25
|
|
reserve_pool_size = 5
|
|
reserve_pool_timeout = 3
|
|
server_lifetime = 3600
|
|
server_idle_timeout = 600
|
|
log_connections = 0
|
|
log_disconnections = 0
|
|
stats_period = 60
|
|
|
|
# Important for prepared statements
|
|
server_reset_query = DISCARD ALL
|
|
server_reset_query_always = 1
|
|
|
|
# Connection limits
|
|
min_pool_size = 10
|
|
max_db_connections = 100
|
|
|
|
# Timeouts
|
|
query_timeout = 0
|
|
query_wait_timeout = 120
|
|
client_idle_timeout = 0
|
|
client_login_timeout = 60
|
|
|
|
# For better performance
|
|
pkt_buf = 8192
|
|
sbuf_loopcnt = 2
|
|
tcp_keepalive = 1
|
|
tcp_keepidle = 1
|
|
tcp_keepintvl = 1
|
|
tcp_keepcnt = 1
|
|
|
|
# Ignore certain PostgreSQL parameters
|
|
ignore_startup_parameters = extra_float_digits,synchronous_commit,work_mem,statement_timeout,idle_in_transaction_session_timeout |