[pgpool-general: 288] Re: idle stale connections hanging around

Lonni J Friedman netllama at gmail.com
Sat Mar 24 02:02:52 JST 2012


On Fri, Mar 23, 2012 at 9:51 AM, Tatsuo Ishii <ishii at postgresql.org> wrote:
>> Greetings,
>> I'm running pgpool-II-3.1.2 on a 64bit Linux system.  I have the
>> following set in my pgpool.conf:
>>
>> child_life_time = 300
>> child_max_connections = 990
>> connection_life_time = 3
>> client_idle_limit = 30
>>
>> I thought this meant that a client connection that was idle for at
>> least 30 seconds would be automatically terminated, yet I see a large
>> number of pgpool 'idle' processes that are days old:
>> postgres 13886 28335  0 Mar04 ?        00:00:00 pgpool: lfriedman
>> nightly 10.31.96.104(59242) idle
>> postgres 17068 28335 0 Mar22 ?        00:00:08 pgpool: lfriedman
>> nightly 10.31.96.232(43232) idle
>> postgres 17501 28335  0 Mar22 ?        00:00:01 pgpool: lfriedman
>> inventory 10.31.96.111(54649) idle
>> postgres 17521 28335  0 Mar22 ?        00:00:07 pgpool: lfriedman
>> nightly 10.31.96.232(43237) idle
>> postgres 17981 28335  0 Mar13 ?        00:00:02 pgpool: lfriedman
>> nightly 10.31.45.25(54973) idle
>> postgres 18152 28335 0 Mar13 ?        00:00:02 pgpool: lfriedman
>> nightly 10.31.96.156(49366) idle
>> postgres 18629 28335 0 Mar13 ?        00:00:01 pgpool: lfriedman
>> nightly 10.31.97.219(54997) idle
>> postgres 19510 28335  0 Mar13 ?        00:00:00 pgpool: lfriedman
>> nightly 10.31.97.218(58289) idle
>>
>> Many of these are from clients that aren't even powered on, so they're
>> clearly not doing anything to keep the connection non-idle.  Is this a
>> bug?
>
> These are new to me. Can you attach gdb one of those processes to get
> a backtrace?

hopefully this is what you need:
(gdb) bt
#0  0x00000031ae4da073 in __select_nocancel () from /lib64/libc.so.6
#1  0x00000000004155ce in pool_check_fd (cp=<value optimized out>)
    at pool_process_query.c:1050
#2  0x000000000041a2f4 in pool_read (cp=0x211bc20, buf=<value
optimized out>, len=1)
    at pool_stream.c:138
#3  0x000000000041841b in read_kind_from_backend (frontend=0x20f9cd0,
backend=0x20e7470,
    decided_kind=0x7fff04db967f "") at pool_process_query.c:3490
#4  0x00000000004468e9 in ProcessBackendResponse (frontend=0x20f9cd0,
backend=0x20e7470,
    state=0x7fff04db98a8, num_fields=0x7fff04db98ac) at
pool_proto_modules.c:2164
#5  0x0000000000418d20 in pool_process_query (frontend=0x20f9cd0,
backend=0x20e7470,
    reset_request=<value optimized out>) at pool_process_query.c:416
#6  0x000000000040a782 in do_child (unix_fd=4, inet_fd=<value
optimized out>) at child.c:354
#7  0x0000000000404e15 in fork_a_child (unix_fd=4, inet_fd=5, id=170)
at main.c:1072
#8  0x0000000000405d0c in reaper () at main.c:2150
#9  0x000000000040779b in main (argc=<value optimized out>,
argv=<value optimized out>)
    at main.c:595

>
>> Is there something that I can do to gracefully terminate these
>> connections (such that pgpool will spawn a new unused process)?
>
> If you are sure that the pgpool child is in idle, kill -9 should work.

Thanks, that does work.


More information about the pgpool-general mailing list