public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tatsuo Ishii <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Re: Sudden increase in connections in pgpool usage environment
Date: Wed, 30 Jul 2025 21:13:24 +0900 (JST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>

>> 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?

What do you mean by "even if a connection is not explicitly needed"?
Can you elaborate more?

> 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.

Yes.

> 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.

For pgpool To create 300 connections to PostgreSQL, you don't need to
have 300 web connections exactly at the same timing.

When a client connects pgpool, one of pgpool "child" process is chosen
by kernel. If the process already have a suitable connections cache
(i.e. matches the requested username/database etc.), no new connection
to PostgreSQL is created. However the process does not have, a new
connection to PostgreSQL is created. Since kernel does not care
whether the particular pgpool process already has the requested
connection to PostgreSQL, it is possible that a pgpool process which
does not have the connection. So if you are unlucky, continuous a few
number of concurrent requests from clients could make all 300 pgpool
process connect to PostgreSQL.

To deal with the situation, you can tweak configurations in "- Life
time -" section of pgpool.conf. See the manual for more details.

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





reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Sudden increase in connections in pgpool usage environment
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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