We've been using pgbouncer for couple days now and found out that the bouncer is super slow. I'd like to have your feedback on what is wrong with my bouncer configuration:
Pressures table is 600k rows
The query I use to test:
SELECT * FROM Pressures LIMIT 1000;
I run this query 50 times
Targeting the db directly each query simple takes 10s to return
Targeting the bouncer the first queries are 10s each then it goes up like crazy and each query takes 1min to return
The postgresDB and the bouncer run on the same EC2 T3.xlarge instance (4vCPU Intel Xeon Platinum 8000, 16gb RAM) When i ssh the instance the load is <2%
My Pgbouncer configuration :
Pool_mode : transaction
max_db_connections=20
default_pool_size=20
max_client_conn=800
I tried also tried
Pool_mode : session
max_db_connections=20
default_pool_size=20
max_client_conn=800
And
Pool_mode : transaction
max_db_connections=5
default_pool_size=5
max_client_conn=600
Exact same issue. What am i missing?
Thanks!