Re: keepalive problem with libpg connection - Mailing list pgsql-general

From Merlin Moncure
Subject Re: keepalive problem with libpg connection
Date
Msg-id b42b73150908110810t61dd5b58q218bb2fca02018fb@mail.gmail.com
Whole thread Raw
In response to keepalive problem with libpg connection  (Juan Backson <juanbackson@gmail.com>)
List pgsql-general
On Tue, Aug 11, 2009 at 3:56 AM, Juan Backson<juanbackson@gmail.com> wrote:
> Hi,
>
> I am writing my own connection pool for libpq's connection.
>
> My goal is to try to reduce the amount of time spent in opening and closing
> socket.   However, I see that Postgres would close my connection after every
> so often.

it's not postgres, most likely someone in the middle is closing
inactive connections, typically after 3-5 minutes.  check out the
keepalive settings in postgresql.conf to handle this on the tcp level
(better than throwing  a select 1).

merlin

pgsql-general by date:

Previous
From: Juan Backson
Date:
Subject: keepalive problem with libpg connection
Next
From: Jan Verheyden
Date:
Subject: mail alert