You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are 9 instances of this Pgbouncer running behind a load balancer. Further elaborating on some of the configs:
max_client_conn = 600 (total client connections across the fleet = 600 * 9 = 5400)
pool_size = 200 (total server connections from pgbouncer to DB = 200 * 9 = 1800)
server_lifetime = 300
I noticed that during an increased period of traffic where we we saturate client connections, ie, hit max_client_conn on all the various pgbouncer instances:
. . .
LOG C-0xaaaad346fd60: (nodb)/(nouser)@ <redacted> closing because: no more connections allowed (max_client_conn) (age=0s)
WARNING C-0xaaaad346fd60: (nodb)/(nouser)@ <redacted> pooler error: no more connections allowed (max_client_conn)
. . .
we also see that the pgbouncer_pools_sv_active and pgbouncer_pools_sv_idle metrics exported by pgbouncer-exporteracross all pgbouncer hosts drops to 0.
On the DB (AWS RDS), we see this manifesting in the form of significantly increased CPU (30% -> 90%) and from 30 steady state DB connections to ~10 connections.
This leads to client connections to remain backed up, with pgbouncer seemingly unable to hand out new server connections. When I churned the pgbouncer instances, ie, by terminating and bringing up new instances, the issue mitigated I saw idle + active server connections increasing. This also caused the waiting clients to drain.
I am looking for advice/ideas on what could potentially cause pgbouncer to get into this state. Specifically:
In what situations can both sv_active and sv_idle metrics drop to 0?
What would make pgbouncer be unable to establish server connections even though the DB ins reachable and healthy?
What other metrics/connection states can I track which might explain why there were 0 active and idle server connections?
Thanks!
The text was updated successfully, but these errors were encountered:
@JelteF - I saw this previous issue #1054 related to a large number of incoming connections stalling pgbouncer when using PAM authentication. In my issue however, we are just using the auth_file based authentication.
Could this still be an issue in this mode?
I have a service using the following Pgbouncer configs:
There are 9 instances of this Pgbouncer running behind a load balancer. Further elaborating on some of the configs:
max_client_conn
=600
(total client connections across the fleet =600 * 9
=5400
)pool_size
=200
(total server connections from pgbouncer to DB =200 * 9
=1800
)server_lifetime
=300
I noticed that during an increased period of traffic where we we saturate client connections, ie, hit
max_client_conn
on all the various pgbouncer instances:we also see that the
pgbouncer_pools_sv_active
andpgbouncer_pools_sv_idle
metrics exported bypgbouncer-exporter
across all pgbouncer hosts drops to0
.On the DB (AWS RDS), we see this manifesting in the form of significantly increased CPU (30% -> 90%) and from
30
steady state DB connections to ~10
connections.This leads to client connections to remain backed up, with pgbouncer seemingly unable to hand out new server connections. When I churned the pgbouncer instances, ie, by terminating and bringing up new instances, the issue mitigated I saw idle + active server connections increasing. This also caused the waiting clients to drain.
I am looking for advice/ideas on what could potentially cause pgbouncer to get into this state. Specifically:
sv_active
andsv_idle
metrics drop to 0?Thanks!
The text was updated successfully, but these errors were encountered: