Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gDtbK-0006Tq-Q8 for pgsql-bugs@arkaria.postgresql.org; Sat, 20 Oct 2018 15:55:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gDtbH-00085G-6O for pgsql-bugs@arkaria.postgresql.org; Sat, 20 Oct 2018 15:55:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gDtbG-00084i-TR for pgsql-bugs@lists.postgresql.org; Sat, 20 Oct 2018 15:55:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gDtb7-0000TB-Ns for pgsql-bugs@lists.postgresql.org; Sat, 20 Oct 2018 15:55:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w9KFtPr1008897; Sat, 20 Oct 2018 11:55:25 -0400 From: Tom Lane To: Jeff Janes cc: sagar5490.more@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15443: Connection loss error come occasionally In-reply-to: References: <15443-52f3aadac6636b2f@postgresql.org> Comments: In-reply-to Jeff Janes message dated "Sat, 20 Oct 2018 10:08:22 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <8895.1540050925.1@sss.pgh.pa.us> Date: Sat, 20 Oct 2018 11:55:25 -0400 Message-ID: <8896.1540050925@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Jeff Janes 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