Skip to content

Instantly share code, notes, and snippets.

@rdegges
Created August 3, 2012 22:55
Show Gist options
  • Save rdegges/3252361 to your computer and use it in GitHub Desktop.
Save rdegges/3252361 to your computer and use it in GitHub Desktop.
Bootstrap a pgbouncer server with sane defaults.
sudo su -
aptitude -y update
aptitude -y safe-upgrade
aptitude -y install pgbouncer postgresql
update-rc.d -f postgresql remove
vim /etc/default/pgbouncer # START=1
vim /etc/pgbouncer/userlist.txt # "username" "password"
vim /etc/pgbouncer/pgbouncer.ini
#####
* = host=ec2-blah port=
pidfile = /tmp/pgbouncer.pid
user = postgres
listen_addr = *
listen_port = 5432
max_client_conn = 200
default_pool_size = 200
server_login_retry = 15
#####
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment