Created
May 6, 2018 22:15
-
-
Save douglasmiranda/72a6453f07014f177cae3b977c67a137 to your computer and use it in GitHub Desktop.
pgbouncer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on https://www.pgday.ch/common/slides/2017_ver6_pgbouncer_20k_English.pdf | |
# Just connect to pgbouncer like you would connect to a postgres server | |
# In this case using the port 6432 | |
# Run pgbouncer as the user pgbouncer (su-exec) | |
[databases] | |
db1 = host=postgres port=5432 dbname=db1 | |
[pgbouncer] | |
listen_addr = * | |
listen_port = 6432 | |
auth_type = md5 | |
# Example: "db1" "pass-db1" | |
auth_file = userlist.txt | |
pool_mode = transaction | |
max_client_conn = 100 | |
default_pool_size = 5 | |
reserve_pool_size = 1 | |
reserve_pool_timeout = 1 | |
query_wait_timeout = 10 | |
client_idle_timeout = 7200 | |
tcp_keepalive = 1 | |
tcp_keepidle = 600 | |
server_lifetime = 60 | |
server_idle_timeout = 30 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment