Re: close inactive client connection

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: close inactive client connection
Date: 2009-09-25 17:03:20
Message-ID: 4ABCF7D8.7040009@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Luiz Bernardi wrote:
> I am developing a system, using the ZeosLib, which maintains a
> permanent connection to the database.
>
> When the client loses the connection, the server does not recognize
> this and keeps the connection as if it were active. When the client
> attempts to reconnect, the server creates a new connection and the
> previous remains active.

how does this happen ? TCP connections don't just wander off and get lost.

> This has caused an excessive increase in the number of active
> connections and hampered the use of the system.
>
> Have any way or setting to make postgres close idle connections?

first, you'd have to identify that they were in fact 'lost' and not just
idle. we have apps that open a socket to postgres, issue some
commands, then sometimes sit for hours before more commands are issued.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2009-09-25 17:11:52 Re: close inactive client connection
Previous Message Pavel Stehule 2009-09-25 16:52:09 Re: