Re: Pgbouncer discard all

From: Fabio Pardi <f(dot)pardi(at)portavita(dot)eu>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Pgbouncer discard all
Date: 2018-10-10 15:31:00
Message-ID: a22f8385-2a49-30a7-b1d2-fc743c2f3245@portavita.eu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Nicola,

I am of the impression that the problem of having waiting clients does not depend from server_idle_timeout

How is the load on both ends of pgbouncer? High? Low? No activity? A lot of content switch perhaps?

I think that a pool_size of 120 is very high, unless you have an XXL database server. Too high numbers will bring lower performances.

Also i think it would be of interest to know the values you are using for:

default_pool_size  min_pool_size and reserve_pool_size

and of main importance is to actually know what are the active connections doing. Are those all active? Did perhaps somebody forgot to close the connection to the db in your application and they are only waiting to be timed out?

About 'DISCARD ALL', that is the default 'server_reset_query'.

regards,

fabio pardi

On 10/10/18 17:03, Nicola Contu wrote:
> Hello,
> we are running pgbouncer 1.9.1 connected to postgres 10.5
>
> Sometimes we are seeing a lot of waiting connections with this query :
>
> DISCARD ALL
>
> This is our pgbouncer config :
>
> [databases]
> dev = host=10.10.10.1 port=5432 dbname=dev auth_user=pgbouncer pool_size=120
>
> [pgbouncer]
> listen_port = 6543
> listen_addr = *
> auth_type = md5
> auth_file = /etc/pgbouncer/users.txt
> auth_query = select uname,phash from user_lookup($1)
> logfile = /var/log/pgbouncer.log
> pidfile = /home/postgres/pgbouncer.pid
> admin_users = admin
> user = postgres
> max_db_connections = 220
> log_connections = 0
> log_disconnections = 0
>
>
> Do you think this can depend on the server_idle_timeout default config value?
>
> Thanks a lot,
> Nicola

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2018-10-10 16:21:15 Re: how to identify the timeline of specified recovery_target_time when do multiple PITR
Previous Message Nicola Contu 2018-10-10 15:03:54 Pgbouncer discard all