Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ca2KY-0002un-Ou for pgsql-bugs@arkaria.postgresql.org; Sat, 04 Feb 2017 15:32:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ca2KX-0007Ve-B6 for pgsql-bugs@arkaria.postgresql.org; Sat, 04 Feb 2017 15:32:49 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ca2Jr-0006mP-EV for pgsql-bugs@postgresql.org; Sat, 04 Feb 2017 15:32:07 +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.84_2) (envelope-from ) id 1ca2Jn-0006uF-Gi for pgsql-bugs@postgresql.org; Sat, 04 Feb 2017 15:32:06 +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 v14FW1gl009112; Sat, 4 Feb 2017 10:32:01 -0500 From: Tom Lane To: Ranjeet Singh03 cc: "pgsql-bugs@postgresql.org" Subject: Re: postgres client connection issue In-reply-to: <1ae21f8f06434b03b1319cc62d35191b@BLRKECMBX37.ad.infosys.com> References: <10664.1486133470@sss.pgh.pa.us> <1ae21f8f06434b03b1319cc62d35191b@BLRKECMBX37.ad.infosys.com> Comments: In-reply-to Ranjeet Singh03 message dated "Sat, 04 Feb 2017 07:40:20 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9110.1486222321.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 04 Feb 2017 10:32:01 -0500 Message-ID: <9111.1486222321@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Ranjeet Singh03 writes: > Thanks Tom for acknowledge my mail. Below is the detail as you requested: > PG Version DBD::Pg : 2.10.3 That's not the Postgres version ... but anyway, given that the server is seeing this: > 2017-02-01 10:56:27 LOG: could not receive data from client: Connection = reset by peer > 2017-02-01 10:56:27 LOG: unexpected EOF on client connection while the client is seeing this: >> DBD::Pg::st execute failed: server closed the connection unexpectedly it sure looks like this is basically a network problem: something in between is killing the connection. If the sessions that are dying had been sitting idle for awhile, the most likely theory is that there's something with an activity timeout, probably a router. If you can't identify the something and change its settings, it might help to enable TCP keepalives. Setting tcp_keepalives_idle to something less than the shortest observed failure interval ought to do it. (The effective default is probably something like an hour, and at a guess, you might need to set it to something near 5 or 10 minutes.) If you're seeing active sessions die like this, that moves it out of the sphere of "something's misconfigured" and into the sphere of "something's broken". Could be as simple as a flaky cable. Looking into the kernel logs for the communicating machines might help; if there's a router in between, try to enable event logging on it. regards, tom lane --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs