Comments (4)
Could you share a (simplified) docker-compose here
Did this happen with prior versions of pgbouncer?
from docker-pgbouncer.
This is the first Pgbouncer version i tried
Docker Compose:
version: 3.9
services:
timescaledb:
image: timescaledb:2.7.2-pg14
container_name: timescale
environment:
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
- POSTGRES_DB=$POSTGRES_DB
- POSTGRES_HOST_AUTH_METHOD=scram-sha-256
command: -c config_file=/etc/postgresql.conf
networks:
DefaultNet:
ipv4_address: 172.20.0.5
volumes:
- certs:/Certs/Analyser
ports:
- 5432:5432
pgbouncer:
image: pgbouncer:1.17.0
restart: always
networks:
DefaultNet:
ipv4_address: 172.20.0.9
ports:
- 6432:6432
volumes:
- certs:/Certs/Analyser
depends_on:
- timescaledb
volumes:
certs_analyser:
name: certs
networks:
DefaultNet:
name: internal_network
ipam:
config:
- subnet: 172.20.0.0/24
pgbouncer.ini
################## Auto generated ##################
[databases]
TEST= host=172.20.0.5 port=5432 user=postgres
;; Configuration section
[pgbouncer]
;;;
;;; Administrative settings
;;;
logfile = /etc/pgbouncer/pgbouncer.log
pidfile = /var/run/pgbouncer/pgbouncer.pid
;;;
;;; Where to wait for clients
;;;
;; IP address or * which means all IPs
listen_addr = 172.20.0.9, 127.0.0.1, localhost
listen_port = 6432
;; Unix socket is also used for -R.
;; On Debian it should be /var/run/postgresql
;unix_socket_dir = /tmp
;unix_socket_mode = 0777
;unix_socket_group =
;;;
;;; TLS settings for accepting clients
;;;
;; disable, allow, require, verify-ca, verify-full
client_tls_sslmode = allow
;; Path to file that contains trusted CA certs
client_tls_ca_file = /Certs/Analyser/TimeScaleDBCert/testca/cacert.pem
;; Private key and cert to present to clients.
;; Required for accepting TLS connections from clients.
client_tls_key_file = /Certs/Analyser/TimeScaleDBCert/client/key.pem
client_tls_cert_file = /Certs/Analyser/TimeScaleDBCert/client/cert.pem
;; fast, normal, secure, legacy, <ciphersuite string>
client_tls_ciphers = HIGH:MEDIUM:+3DES:!aNULL
;; all, secure, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
client_tls_protocols = tlsv1.2
;; none, auto, legacy
client_tls_dheparams = auto
;; none, auto, <curve name>
client_tls_ecdhcurve = auto
;;;
;;; TLS settings for connecting to backend databases
;;;
;; disable, allow, require, verify-ca, verify-full
server_tls_sslmode = allow
;; Path to that contains trusted CA certs
server_tls_ca_file = /Certs/Analyser/TimeScaleDBCert/testca/cacert.pem
;; Private key and cert to present to backend.
;; Needed only if backend server require client cert.
server_tls_key_file = /Certs/Analyser/TimeScaleDBCert/client/key.pem
server_tls_cert_file = /Certs/Analyser/TimeScaleDBCert/client/cert.pem
;; all, secure, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
server_tls_protocols = tlsv1.2
;; fast, normal, secure, legacy, <ciphersuite string>
server_tls_ciphers = HIGH:MEDIUM:+3DES:!aNULL
;;;
;;; Authentication settings
;;;
;; any, trust, plain, md5, cert, hba, pam, scram-sha-256
auth_type = scram-sha-256
auth_file = /etc/pgbouncer/userlist.txt
;; Path to HBA-style auth config
;auth_hba_file = /etc/pgbouncer/pg_hba.hba
;; Query to use to fetch password from database. Result
;; must have 2 columns - username and password hash.
; auth_query = SELECT usename, passwd FROM pg_shadow WHERE usename=$1
;;;
;;; Users allowed into database 'pgbouncer'
;;;
;; comma-separated list of users who are allowed to change settings
admin_users = postgres
;; comma-separated list of users who are just allowed to use SHOW command
stats_users = postgres
;;;
;;; Pooler personality questions
;;;
;; When server connection is released back to pool:
;; session - after client disconnects (default)
;; transaction - after transaction finishes
;; statement - after statement finishes
pool_mode = transaction
;; Query for cleaning connection immediately after releasing from
;; client. No need to put ROLLBACK here, pgbouncer does not reuse
;; connections where transaction is left open.
server_reset_query = DISCARD ALL
;;;
;;; Connection limits
;;;
;; Total number of clients that can connect
max_client_conn = 1000
;; Default pool size. 20 is good number when transaction pooling
;; is in use, in session pooling it needs to be the number of
;; max clients you want to handle at any moment
default_pool_size = 35
;; Minimum number of server connections to keep in pool.
;min_pool_size = 0
; how many additional connection to allow in case of trouble
reserve_pool_size = 10
;; If a clients needs to wait more than this many seconds, use reserve
;; pool.
reserve_pool_timeout = 3
;; Maximum number of server connections for a database
max_db_connections = 150
;;;
;;; Logging
;;;
;; Syslog settings
syslog = 0
syslog_facility = daemon
syslog_ident = pgbouncer
;; log if client connects or server connection is made
log_connections = 1
;; log if and why connection was closed
log_disconnections = 1
;; log error messages pooler sends to clients
log_pooler_errors = 1
;; write aggregated stats into log
log_stats = 1
;; Logging verbosity. Same as -v switch on command line.
verbose = 0
;;;
;;; Timeouts
;;;
;; Close server connection if its been connected longer.
server_lifetime = 3600
;; Close server connection if its not been used in this time. Allows
;; to clean unnecessary connections from pool after peak.
server_idle_timeout = 120
;; Cancel connection attempt if server does not answer takes longer.
server_connect_timeout = 15
;; If server login failed (server_connect_timeout or auth failure)
;; then wait this many second before trying again.
server_login_retry = 3
;; Dangerous. Server connection is closed if query does not return in
;; this time. Should be used to survive network problems, _not_ as
;; statement_timeout. (default: 0)
query_timeout = 0
;; Dangerous. Client connection is closed if the query is not
;; assigned to a server in this time. Should be used to limit the
;; number of queued queries in case of a database or network
;; failure. (default: 120)
query_wait_timeout = 120
;; Dangerous. Client connection is closed if no activity in this
;; time. Should be used to survive network problems. (default: 0)
client_idle_timeout = 0
;; Disconnect clients who have not managed to log in after connecting
;; in this many seconds.
client_login_timeout = 60
;; Close connections which are in "IDLE in transaction" state longer
;; than this many seconds.
idle_transaction_timeout = 10000
from docker-pgbouncer.
Look: pgbouncer/pgbouncer#750
from docker-pgbouncer.
Hi @zN3utr4l let me know if this is still an issue with v1.23.1-p0
or latest
from docker-pgbouncer.
Related Issues (20)
- DNS Resolution Issues as udns No Longer Available HOT 14
- FATAL @src/objects.c:420 in function put_in_order(): put_in_order: found existing elem HOT 6
- Support for scram-sha-256 HOT 9
- Not working with `--link` HOT 1
- Support for Azure Active Directory Authentication
- Base64 Encoded SSL Certificates?
- Update version HOT 1
- Passwords cannot contain `*` chars HOT 1
- %include directive in the configuration generator is missing
- Changed image tag format to have a "v" prefix HOT 2
- Allow use of secrets when using docker-compose to set password
- Need more explicit, updated, and differentiable examples.
- v1.21.0 release upgrade HOT 2
- Add `max_prepared_statements` setting HOT 1
- Connecting to the admin console
- Custom entrypoint.sh
- pgbouncer v1.22 HOT 2
- FATAL: server login failed: wrong password type HOT 2
- Support auth_dbname through env variable HOT 1
- Update Alpine Base Image and PostgreSQL to Mitigate CVE-2023-5869 Vulnerability HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-pgbouncer.