Re: Sudden increase in connections in pgpool usage environment

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: r_suzuki(at)sjts(dot)co(dot)jp
Cc: pgpool-general(at)lists(dot)postgresql(dot)org
Subject: Re: Sudden increase in connections in pgpool usage environment
Date: 2025-07-28 10:55:22
Message-ID: 20250728.195522.1634717277013819274.ishii@postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgpool-general

> Hello,
> Thank you for always providing the convenient pgpool service.
> We really appreciate it.
> *This email was created using automatic translation from Japanese.
>
> At the moment, we have no idea what the cause might be,
> but we are experiencing a serious issue in the environment where
> pgpool is used—
> sudden spikes in the number of connections to PostgreSQL, which is
> causing us great trouble.
>
> The environment is as follows:
>
> Server 1: Tomcat / pgpool (4.2.1) / PostgreSQL (13.11)
> Server 2: PostgreSQL (13.11)
>
> • A custom-built web system is running on Tomcat.
> • The number of connections from Tomcat to pgpool is capped at 300.
> • pgpool is used to provide redundancy between the PostgreSQL servers on
> • Server 1 and Server 2.
> • There is only one database running on PostgreSQL, and only one user
> • connects to it.
>
> In this setup, the number of connections, which is usually around 25,
> suddenly increases to 100, 200, and even up to the maximum of 300 in
> just a few minutes.
> This phenomenon occurs irregularly.
>
> We initially suspected an issue in our custom system and ran
> pg_stat_activity to check the "query" column.
> However, only a few queries appeared to be issued by our system.
> Most of the entries were in the "idle" state after executing a
> "DISCARD ALL" query.
>
> We suspect that some setting might be triggering a mass reset of
> connection,
> but due to our limited knowledge, we are struggling with the
> investigation.
> We apologize for the trouble, but if you have any insights, we would
> greatly appreciate it.
>
>
> We apologize for the trouble, but if you have any idea what might be
> happening,
> we would greatly appreciate your insight.

First of all, Pgpool-II 4.2.1 is pretty old (released 5 years ago).
It has lots of bugs and even multiple vulnerabilities. I strongly
recommend you to upgrade to newer version of Pgpool-II.

> Server 1: Tomcat / pgpool (4.2.1) / PostgreSQL (13.11)

Is it possible Server1 overloaded? I am asking because on server1 3
kinds of servers are running. I suspect pgpool process are not enough
CPU being assigned, and cannot dispatch incoming new connections.

Best regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp

In response to

Responses

Browse pgpool-general by date

  From Date Subject
Next Message 鈴木 涼 2025-07-29 08:58:41 Re: Sudden increase in connections in pgpool usage environment
Previous Message 鈴木 涼 2025-07-28 07:32:13 Sudden increase in connections in pgpool usage environment