[pgpool-general: 3980] Re: Possible connection leak
derek_kouch at yahoo.com.au
Tue Aug 18 11:53:16 JST 2015
The old one has a value of 0. But remains in the list until the child life time is reached.
> On 18 Aug 2015, at 12:46 pm, Tatsuo Ishii <ishii at postgresql.org> wrote:
> Does not reporduce here. Are sure that "Connected" field is 1 for both
> the new and old database?
> Database : test2
> Username : t-ishii
> Start time : 2015-08-18 11:40:05
> Creation time: 2015-08-18 11:44:17
> Major : 3
> Minor : 0
> Counter : 1
> Backend PID : 6564
> Connected : 1
> PID : 6534
> Backend ID : 0
> Best regards,
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
>> Psql to pgpool.
>> After logging into the Postgres database, then switch to another database, it would have 2 processes according to pcp_proc_info.
>> Kind regards,
>> On 18 Aug 2015, at 11:59 am, Tatsuo Ishii <ishii at postgresql.org> wrote:
>>>> 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
>>> 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
More information about the pgpool-general