From: | 鈴木 涼 <r_suzuki(at)sjts(dot)co(dot)jp> |
---|---|
To: | Tatsuo Ishii <ishii(at)postgresql(dot)org> |
Cc: | pgpool-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Sudden increase in connections in pgpool usage environment |
Date: | 2025-07-29 08:58:41 |
Message-ID: | ced5300d-8b5a-418c-8252-cfdcfa95add5@sjts.co.jp |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgpool-general |
Thank you for your message.
We are aware that the version we are currently using is outdated, and we also recognize this as an issue.
We are planning to address it as soon as possible.
We apologize for having to ask a question based on the older version.
> 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.
Under normal conditions, the server load is not particularly problematic.
Rather, it seems that the load increases at the same time the "DISCARD ALL" occurs.
Regarding the phrase "cannot dispatch incoming new connections,"
I was wondering—does pgpool sometimes establish connections to PostgreSQL automatically,
even if a connection is not explicitly needed?
My current understanding is that a connection to PostgreSQL is created only when Tomcat makes a request for one,
and that pgpool initiates the connection at that point.
Since it’s a bit hard to imagine the web system suddenly using up as many as 300 connections all at once,
I just wanted to check and make sure I’m not misunderstanding how this works.
Best regards.
On 2025/07/28 19:55, Tatsuo Ishii wrote:
>> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Luca Ferrari | 2025-07-29 10:32:17 | main vs primary |
Previous Message | Tatsuo Ishii | 2025-07-28 10:55:22 | Re: Sudden increase in connections in pgpool usage environment |