Troubleshooting¶
Common problems with the PgBouncer pooler, what causes them and how to fix them.
Queries fail right after launch¶
Cause: the example databases still point at 127.0.0.1:15432, the
temporary backend that exists only while the walkthrough runs.
Fix: point them at your database, see Point PgBouncer at your database, then reload PgBouncer.
Connections without TLS are refused¶
Cause: PgBouncer requires TLS from every client. A client using
sslmode=disable is rejected.
Fix: use sslmode=verify-full with
sslrootcert=/usr/local/share/sushi/pgbouncer/ca.pem, or at least
sslmode=require.
Password authentication fails¶
Cause: the password does not match /etc/pgbouncer/userlist.txt, or your
database does not accept the same user name and password.
Fix: check the client password against the user list, and make sure the same role and password exist on your database, see Users and passwords. Reload PgBouncer after editing the user list.
The backend refuses the connection¶
Cause: PgBouncer connects to your database with TLS required. A server without TLS, or a security group that blocks the instance, refuses it.
Fix: enable TLS on your PostgreSQL server (Amazon RDS supports it), and allow the instance in the database's security group.
SET values or prepared statements leak or disappear¶
Cause: the app database uses transaction pooling, so session state is
not tied to one client.
Fix: connect to the session database, or change pool_mode for that
entry, see Pool modes and sizes.
Clients wait for a connection¶
Cause: the pool is full. By default each database and user pair gets two server connections.
Fix: raise default_pool_size, and max_client_conn if needed, within
your database's connection limit. Check SHOW POOLS in the
admin console.
Certificate verification fails from another host¶
Cause: the server certificate created on first boot covers only
localhost and 127.0.0.1.
Fix: issue a certificate that includes the address clients use, see Reach PgBouncer from your VPC.
PgBouncer does not start after first boot¶
Fix: read the first-boot log, correct the cause, and retry:
sudo journalctl -u sushi-pgbouncer-firstboot --no-pager
sudo systemctl restart sushi-pgbouncer-firstboot
sudo systemctl start pgbouncer
If it still fails, contact info@softwaresushi.com.