[pgpool-general: 9297] Re: Failover or Failback event detected
Aviral Singh
aviral.singh21 at gmail.com
Mon Dec 23 20:25:35 JST 2024
Hello Tatsuo,
Yes, the failover_on_backend_error is turned *off*.
[image: image.png]
And the pgpool config and docker manifest file is mentioned below:
*pgpool.conf:*
> connection_cache = 'off'
> max_pool = '1'
> num_init_children = '380'
*** *Rest all parameters are using default values.
*docker manifest file for pgpool:*
> version: '3.8'
>
> networks:
> tiot-service-bridge:
> external: true
>
> configs:
> pgpool_config:
> file: /services/timescaledb-pgpool/myconf.conf
>
> services:
> ts-pgpool:
> hostname: ts-pgpool
> image: /bitnami/pgpool:4.2.5
> networks:
> - tsdb-service-bridge
> ports:
> - 6435:5432
> configs:
> - source: pgpool_config
> target: /config/myconf.conf
> uid: '1001'
> gid: '0'
> mode: 0644
> environment:
> - PGPOOL_USER_CONF_FILE=/config/myconf.conf
> -
> PGPOOL_BACKEND_NODES=0:db-node-1:5432,1:db-node-2:5432,2:db-node-3:5432
> - PGPOOL_POSTGRES_USERNAME=postgres
> - PGPOOL_POSTGRES_PASSWORD=Passw0rd
> - PGPOOL_SR_CHECK_USER=repmgr
> - PGPOOL_SR_CHECK_PASSWORD=Passw0rd
> - PGPOOL_ENABLE_LDAP=no
> - PGPOOL_ENABLE_LOAD_BALANCING=no
> - PGPOOL_ADMIN_USERNAME=postgres
> - PGPOOL_ADMIN_PASSWORD=Passw0rd
> - PGPOOL_POSTGRES_CUSTOM_USERS=app_user,tsdb
> - PGPOOL_POSTGRES_CUSTOM_PASSWORDS=Passw0rd,Passw0rd
> - PGPOOL_CHILD_LIFE_TIME=300
> deploy:
> resources:
> reservations:
> cpus: '1'
> memory: 512M
> restart_policy:
> condition: any
> sysctls:
> - net.ipv4.tcp_keepalive_time=600
> - net.ipv4.tcp_keepalive_intvl=30
> - net.ipv4.tcp_keepalive_probes=10
> healthcheck:
> test: ["CMD", "/opt/bitnami/scripts/pgpool/healthcheck.sh"]
> interval: 1m
> timeout: 20s
> retries: 5
> start_period: 30s
>
On Mon, 23 Dec 2024 at 07:56, Tatsuo Ishii <ishii at postgresql.org> wrote:
> > Hello,
> >
> > Along with other services running in docker swarm architecture I have a
> > database server of 3 PostgreSQL nodes deployed in Patroni + ETCD HA
> > Solution and a connection pooling method, PgPool-II.
> >
> > PostgreSQL Version: 13.8
> > PgPool Version: 4.2.5
> > HA Cluster-Management of Database: Patroni + ETCD (1 Primary + 2 Standby)
> >
> > ** Note: Load Balancing is disabled. All the read-write operations are
> > routed only to Primary Node.
> >
> > *Issue:* Frequent logs related to failover or failback event detected.
> > Pgpool-II Logs:
> >
> >> 2024-12-19 18:09:45: pid 776: LOG: failover or failback event detected
> >> 2024-12-19 18:09:45: pid 776: DETAIL: restarting myself
> >
> >
> > I also tracked the database logs, but didn't find any logs relevant to
> the
> > issue.
> > Database Logs:
> >
> >> 2024-12-19 18:09:45 UTC [81078]: [67646169.13cb6-1]
> >> [unknown]@[unknown],app=[unknown] [00000] LOG: connection received:
> >> host=10.10.1.122 port=42172
> >> 2024-12-19 18:09:45 UTC [81078]: [67646169.13cb6-2] tsdb at tsdb
> ,app=[unknown]
> >> [00000] LOG: connection authorized: user=tsdb database=tsdb
> >
> >
> > As per my understanding, these pgpool-II logs occur when Pgpool-II is not
> > able to communicate with PostgreSQL nodes. Which happens probably when
> > Database is not running or service is restarted.
> > But the database service seems to be running normally.
>
> Yes, but in addition to this, communication error between pgpool and
> PostgreSQL is treated as PostgreSQL down event too.
>
> > Please help on this issue. Am I missing something to check or there can
> be
> > any other issue?
>
> Do you turn off failover_on_backend_error?
>
> Can you share pgpool.conf? (you can make it blank sensitive
> information such as password and IP address).
>
> Best reagards,
> --
> Tatsuo Ishii
> SRA OSS K.K.
> English: http://www.sraoss.co.jp/index_en/
> Japanese:http://www.sraoss.co.jp
>
--
*Thanks & Regards*
Aviral Singh
Contact No: 8765789951
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20241223/2aaf9902/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 3588 bytes
Desc: not available
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20241223/2aaf9902/attachment.png>
More information about the pgpool-general
mailing list