Skip to content

Instantly share code, notes, and snippets.

@posulliv
Created June 28, 2012 18:29
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save posulliv/3013089 to your computer and use it in GitHub Desktop.
Save posulliv/3013089 to your computer and use it in GitHub Desktop.
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