From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: sagar5490.more@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15443: Connection loss error come occasionally
Date: Sat, 20 Oct 2018 11:55:25 -0400
Message-ID: <8896.1540050925@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMkU=1zvUdWGnjcnHCQ11LErz+v3_rRWqLK9eyJpq=ZzeNHJUA@mail.gmail.com>
References: <15443-52f3aadac6636b2f@postgresql.org>
<CAMkU=1zvUdWGnjcnHCQ11LErz+v3_rRWqLK9eyJpq=ZzeNHJUA@mail.gmail.com>
Jeff Janes <jeff.janes@gmail.com> writes:
> On Fri, Oct 19, 2018 at 6:39 AM PG Bug reporting form <
> noreply@postgresql.org> wrote:
>> org.postgresql.util.PSQLException: An I/O error occurred while sending to
>> the backend.
>> Caused by: java.net.SocketException: Connection reset by peer: socket write
>> error
> Probably a firewall or gateway dropping the connections that they perceive
> as being idle.
Yeah, that's what it looks like to me too.
> Seems like your application should be designed to recover from this without
> a full restart.
That's not a bad idea, but you can probably also alleviate the problem
by enabling TCP keepalives on the connection. PG has both server-side
and client-side (at least in libpq) options for that. Should be
sufficient to turn it on at just one end.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, jeff.janes@gmail.com, sagar5490.more@gmail.com
Subject: Re: BUG #15443: Connection loss error come occasionally
In-Reply-To: <8896.1540050925@sss.pgh.pa.us>
References: <15443-52f3aadac6636b2f@postgresql.org> <CAMkU=1zvUdWGnjcnHCQ11LErz+v3_rRWqLK9eyJpq=ZzeNHJUA@mail.gmail.com> <8896.1540050925@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox