Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgbouncer' sv_active and postgres active connection numbers doesn't match #992

Open
tengilim opened this issue Dec 6, 2023 · 1 comment
Labels
moreinfo pending-close will be closed if no further discussion

Comments

@tengilim
Copy link

tengilim commented Dec 6, 2023

Hi;

Sometime we face pool filling problem. When we check db and pgbouncer side we see that the pgboucner's sv_active connection doesn' match postgres side. When we see the 80 active connection per pool (we have 3 pgbouncers it means 240 active connections on db) , we cant see these active connection on postgres side we saw 60 active connections.

After a while pool sessions like that:

psql (11.17, server 1.17.0/bouncer)

pgbouncer=# show pools;
database | user | cl_active | cl_waiting | cl_cancel_req | sv_active | sv_idle | sv_used | sv_tested | sv_login | maxwait | maxwait_us | pool_mode
--------------+-------------------+-----------+------------+---------------+-----------+---------+---------+-----------+----------+---------+------------+-------------
xxdb | dba | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | session
xxdb | xxdb_test_user | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | transaction
xxdb | xxdb_user | 357 | 419 | 0 | 80 | 0 | 0 | 0 | 0 | 0 | 142343 | transaction

What could be the problem?

@eulerto
Copy link
Member

eulerto commented Dec 13, 2023

You don't provide evidence there is an issue here. The statistics reflects the time you run show pools. You also didn't show the output from the other 2 PgBouncer services -- the statistic is per service -- and the pg_stat_activity output. It might be the connections were closed between show pools and pg_stat_activity.

@eulerto eulerto added the pending-close will be closed if no further discussion label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
moreinfo pending-close will be closed if no further discussion
Projects
None yet
Development

No branches or pull requests

2 participants