Re: Connection reset by peer / broken pipe - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Connection reset by peer / broken pipe
Date
Msg-id D960CB61B694CF459DCFB4B0128514C201F3F556@exadv11.host.magwien.gv.at
Whole thread Raw
In response to Re: Connection reset by peer / broken pipe  ("Jeff Wigal (Referee Assistant)" <jeff@referee-assistant.com>)
List pgsql-general
Jeff Wigal wrote:
>>> I am running Postgres 8.2.3 and am seeing the following error messages in my
>>> logs:
>>>
>>> LOG:  SSL SYSCALL error: Connection reset by peer
>>> LOG:  could not receive data from client: Connection reset by peer
>>> LOG:  unexpected EOF on client connection
>>> LOG:  could not send data to client: Broken pipe
>>
>> Do your client applications tend to leave an open connection sitting
>> idle for awhile?  If so you might be getting burnt by idle-connection
>> timeouts in intervening routers.  NAT-capable boxes in particular
>> will kill a connection that carries no data for "too long".  If you're
>> lucky the router will offer a way to adjust its timeout ...
>
> I'm in the process of tracking down the cause of this... Is
> there any way on the server side of things to terminate a
> connection after "x" number of minutes?  For what we're
> doing, there is no reason to have a connection open after 10
> minutes.

There are tcp_keepalives_idle, tcp_keepalives_interval, and tcp_keepalives_count
(see http://www.postgresql.org/docs/8.3/static/runtime-config-connection.html).

They can make the server check idle connections and detect dead ones,
which will be closed.

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: "josep porres"
Date:
Subject: edb-debugger, debugging pl/pgsql
Next
From: "David Wilson"
Date:
Subject: Re: select distinct and index usage