Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
sudo apt-get install pgbouncer
# edit /etc/pgbouncer/pgbouncer.ini file
# edit /etc/default/pgbouncer file and set START=1
sudo service pgbouncer start
contents of /etc/pgbouncer/pgbouncer.ini file
[databases]
drupal = host=127.0.0.1 port=5432 dbname=drupal
[pgbouncer]
logfile = /var/log/postgresql/pgbouncer.log
pidfile = /var/run/postgresql/pgbouncer.pid
listen_addr = 127.0.0.1
listen_port = 6432
unix_socket_dir = /var/run/postgresql
auth_type = plain
auth_file = /etc/pgbouncer/userlist.txt
admin_users = drupal
stats_users =
pool_mode = session
server_reset_query =
ignore_startup_parameters = application_name
server_check_query = select 1
server_check_delay = 10
max_client_conn = 100
default_pool_size = 20
log_connections = 1
log_disconnections = 1
log_pooler_errors = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.