Re: i can't connect after some periode

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: i can't connect after some periode
Дата
Msg-id dcc563d10807100748q6a16cd09q125244322713a985@mail.gmail.com
обсуждение исходный текст
Ответ на Re: i can't connect after some periode  (Lennin Caro <lennin.caro@yahoo.com>)
Список pgsql-sql
On Thu, Jul 10, 2008 at 8:22 AM, Lennin Caro <lennin.caro@yahoo.com> wrote:
>
>
>
> --- On Thu, 7/10/08, aldy <aldy@teodore.com> wrote:
>
>> From: aldy <aldy@teodore.com>
>> Subject: Re: [SQL] i can't connect after some periode
>> To: pgsql-sql@postgresql.org
>> Date: Thursday, July 10, 2008, 8:16 AM
>> From: "A. Kretschmer"
>> <andreas.kretschmer@schollglas.com>
>> Sent: Thursday, July 10, 2008 14:14
>>
>>
>> >First, don't hijack other threads, your mail
>> contains a
>> >References-header:
>>
>> owkay, i'm sorry for that
>>
>> > Maybe the clients do not close the connection and
>> after some time you
>> > have more than 'max_connections' (Default
>> 100).
>> >
>> > You can increase this value in your postgresql.conf.
>> >
>> >
>> > You can also check, how many active connections are
>> open with 'select *
>> > from pg_stat_activity'.
>> >
>> >
>> > Hope that helps, Andreas
>>
>> thanks for the answer,
>> is there any procedure(utility) or configuration in
>> postgresql which can
>> auto close for connection that idle for some minutes
>>
> config parameters in postgres.conf
>
> tcp_keepalives_idle (integer)
> tcp_keepalives_interval (integer)
> tcp_keepalives_count (integer)

Note that if the client is still up and running, then this will not
close the connection.   However, if a firewall between client and
server is dropping idle connections then this will harvest them.

There is no built in functionality to disconnect idle connections that
are still alive.  You'd have to write some sort of shell script to
find them and send them a SIGTERM signal (is that the right signal?  I
always forget which signal is the right one.  Could be SIGHUP or
SIGQUIT too.

A better option might be to look into pgpool, which can allow you to
keep your db connections down while having a large number of fairly
cheap connections kept open on the client side.


В списке pgsql-sql по дате отправления:

Предыдущее
От: Lennin Caro
Дата:
Сообщение: Re: i can't connect after some periode
Следующее
От: "Chris Preston"
Дата:
Сообщение: Converting Copy to insert statement in backup file