Pgbouncer cannot connect to server

I have successfully installed PostgreSQL using Percona PostgreSQL Operator following the step by step guide Install Percona Distribution for PostgreSQL on Minikube

I have also verified all the pods are up and running in minikube however when I wanted to connect to the cluster1-pgbouncer I encountered psql: error: FATAL: pgbouncer cannot connect to server. Anyone here ever encounters such issue? Kindly advice.

Below is the screenshot of the error.

1 Like

Hi @Hilary_Ho_Jia_Hao ,

I have tried to reproduce this issue but without any results :frowning:

bash-4.4$ PGPASSWORD=Qrtj4ilhml83iD5GnUpYjuUw psql -h cluster1-pgbouncer -p 5432 -d pgdb -U pguser
psql (14.1)
Type "help" for help.

pgdb=> \l

How did you deploy pg-client ? Is it a separate pod? Please share more information regarding it.

1 Like

Hi @Slava_Sarzhan ,

I used the command as describe in the step by step guide kubectl run -i --rm --tty pg-client --image=perconalab/percona-distribution-postgresql:13.2 --restart=Never -- bash -il . As I execute kubectl get pods I can see the pg-client pod is running as a separate pod as shown below.

Screenshot from 2022-02-22 15-36-55

1 Like

Hi @Slava_Sarzhan,

I think I found the issue, seems like it was caused by insufficient CPU for pgbouncer and it just dies off.