[pgpool-general: 3977] Re: Possible connection leak

Tatsuo Ishii ishii at postgresql.org
Tue Aug 18 10:59:13 JST 2015


> Hi,
> 
> I'm current running pgpool-II 3.4.3-1 using pgpoolAdmin 3.4.1 on Rhel7.1.
> 
> When I connect using psql to database1 via the virtual ip, then later switch over to another database2 using the "\c". Then switch back to database1. Pgpool creates 3 connections, which I can see in pgpoolAdmin->status->processes.
> 
> If I continue to switch between the two databases, it will continue to increase the number of pgpool connections via the virtual ip. Eventually, these connections timeout when it reaches the child_life_time value or if it reaches the num_init_children limit, it will hang until a connection is available.

I don't know when you say "the number of pgpool connections", these
are from client (psql) to pgpool or pgpool to PostgreSQL. Because the
former will not increase as long as the number of psql you are using,
I assume you are referring to connections from pgpool to
PostgreSQL.

The number could increase until num_init_children reaches. However
some of process are expected to accept connections from clients. You
could verify it by using "show pool_nodes". "pool_connected" column
indicates that the process is ready to accept connections from clients
(in this case 0).

Please remeber, however, that psql keeps old connection until \c
succeeds. For example, if num_init_children = 1, you are never able to
use \c.

> I have the connection_cache on.
> 
> Is there something that I need to set?

You might want to set client_idle_limit.

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


More information about the pgpool-general mailing list