pg.ddx.io  pgbouncer/pgbouncer GitHub issues and pull requests  
help / color / mirror / Atom feed
From: fresh-borzoni (@fresh-borzoni) <noreply+fresh-borzoni@github.com>
To: pgbouncer/pgbouncer <noreply+pgbouncer-pgbouncer@github.com>
Subject: Re: [pgbouncer/pgbouncer] issue #1217: Peering and multiple entries in hosts issue
Date: Thu, 05 Dec 2024 14:29:13 +0000
Message-ID: <gh-pgbouncer-pgbouncer-1217-c2520479331@github.com> (raw)
In-Reply-To: <gh-pgbouncer-pgbouncer-1217@github.com>
References: <gh-pgbouncer-pgbouncer-1217@github.com>

@eulerto 
Sure, it's mostly the question of how peering plays with comma separated list in hosts.

We use pgbouncer 1.23.1, running in k8s, 11 pods
so we have peers specified like this, also peer_id is specified in config to identify itself.
```
[peers]
1 = host=pgbouncer-0.pgbouncer-headless.default.svc.cluster.local. port=5432
2 = host=pgbouncer-1.pgbouncer-headless.default.svc.cluster.local. port=5432
3 = host=pgbouncer-2.pgbouncer-headless.default.svc.cluster.local. port=5432
...
11 = host=pgbouncer-10.pgbouncer-headless.default.svc.cluster.local. port=5432
```

and then we have 
```
[databases]
db = host=db_rw,db_ro port=5432 ...
```

query timeout is specified like this:
```
[pgbouncer]
  listen_addr = 0.0.0.0
  listen_port = 5432
  ...
  query_timeout = 10
  server_tls_sslmode = verify-ca
  server_tls_ca_file = /etc/db/db-bundle.pem
  client_tls_sslmode = require
  client_tls_key_file = /etc/pgbouncer/pgbouncer_tls_key
  client_tls_cert_file = /etc/pgbouncer/pgbouncer_tls_crt
  ```

in the logs I see that timeout isn't respected:
```
"2024-11-29T12:56:55.110Z","""i-0e8745f51893f468c""","""pgbouncer-db""","2024-11-29 12:56:55.110 UTC [7] LOG C-0xaaaaef7a2bb8: db_rw/app_rw@172.19.32.144:48272 closing because: client unexpected eof (age=119s)"
"2024-11-29T12:54:55.146Z","""i-0e8745f51893f468c""","""pgbouncer-db""","2024-11-29 12:54:55.146 UTC [7] LOG C-0xaaaaef7a2bb8: db_rw/app_rw@172.19.32.144:48272 login attempt: db=db_rw user=app_rw tls=TLSv1.3/TLS_AES_256_GCM_SHA384 replication=no"
"2024-11-29T12:54:53.473Z","""i-0e8745f51893f468c""","""pgbouncer-db""","2024-11-29 12:54:53.473 UTC [7] LOG C-0xaaaaef7a2bb8: (nodb)/(nouser)@172.19.7.94:42628 closing because: cancel request for idle client (age=0s)"
"2024-11-29T12:54:53.274Z","""i-0e8745f51893f468c""","""pgbouncer-db""","2024-11-29 12:54:53.274 UTC [7] LOG C-0xaaaaef7a2bb8: db_rw/app_rw@172.19.10.119:38718 closing because: client close request (age=0s)"
"2024-11-29T12:54:53.251Z","""i-0e8745f51893f468c""","""pgbouncer-db""","2024-11-29 12:54:53.251 UTC [7] LOG C-0xaaaaef7a2bb8: db_rw/app_rw@172.19.10.119:38718 login attempt: db=db_rw user=app_rw tls=TLSv1.3/TLS_AES_256_GCM_SHA384 replication=no"
"2024-11-29T12:54:53.132Z","""i-0e8745f51893f468c""","""pgbouncer-db""","2024-11-29 12:54:53.132 UTC [7] LOG C-0xaaaaef7a2bb8: db_rw/app_rw@172.19.60.136:37506 closing because: client unexpected eof (age=119s)"
"2024-11-29T12:52:53.185Z","""i-0e8745f51893f468c""","""pgbouncer-db""","2024-11-29 12:52:53.185 UTC [7] LOG C-0xaaaaef7a2bb8: db_rw/app_rw@172.19.60.136:37506 login attempt: db=db_rw user=app_rw tls=TLSv1.3/TLS_AES_256_GCM_SHA384 replication=no"
"2024-11-29T12:52:53.152Z","""i-0e8745f51893f468c""","""pgbouncer-db""","2024-11-29 12:52:53.152 UTC [7] LOG C-0xaaaaef7a2bb8: peer-5@172.19.45.1:45714 closing because: successfully sent cancel request (age=0s)"
"2024-11-29T12:52:52.853Z","""i-0e8745f51893f468c""","""pgbouncer-db""","2024-11-29 12:52:52.853 UTC [7] LOG C-0xaaaaef7a2bb8: pgbouncer/datadog@127.0.0.1:50874 closing because: client close request (age=0s)"
"2024-11-29T12:52:52.853Z","""i-0e8745f51893f468c""","""pgbouncer-db""","2024-11-29 12:52:52.853 UTC [7] LOG C-0xaaaaef7a2bb8: pgbouncer/datadog@127.0.0.1:50874 login attempt: db=pgbouncer user=datadog tls=TLSv1.3/TLS_AES_256_GCM_SHA384 replication=no"
"2024-11-29T12:52:52.629Z","""i-0e8745f51893f468c""","""pgbouncer-db""","2024-11-29 12:52:52.629 UTC [7] LOG C-0xaaaaef7a2bb8: (nodb)/(nouser)@172.19.36.84:42172 closing because: cancel request for idle client (age=0s)"
"2024-11-29T12:52:52.260Z","""i-0e8745f51893f468c""","""pgbouncer-db""","2024-11-29 12:52:52.260 UTC [7] LOG C-0xaaaaef7a2bb8: db_rw/app_rw@172.19.16.221:38514 closing because: client close request (age=240s)"
```

view thread (4+ messages)  latest in thread

Message-ID: <gh-pgbouncer-pgbouncer-1217-c2520479331@github.com>
Permalink:  ../gh-pgbouncer-pgbouncer-1217-c2520479331@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox