From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ranjeet Singh03 <Ranjeet_Singh03@infosys.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: postgres client connection issue
Date: Sat, 04 Feb 2017 10:32:01 -0500
Message-ID: <9111.1486222321@sss.pgh.pa.us> (raw)
In-Reply-To: <1ae21f8f06434b03b1319cc62d35191b@BLRKECMBX37.ad.infosys.com>
References: <bb0520c007404b09b8c751193487ea07@BLRKECMBX34.ad.infosys.com>
<10664.1486133470@sss.pgh.pa.us>
<1ae21f8f06434b03b1319cc62d35191b@BLRKECMBX37.ad.infosys.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Ranjeet Singh03 <Ranjeet_Singh03@infosys.com> 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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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, Ranjeet_Singh03@infosys.com
Subject: Re: postgres client connection issue
In-Reply-To: <9111.1486222321@sss.pgh.pa.us>
References: <bb0520c007404b09b8c751193487ea07@BLRKECMBX34.ad.infosys.com> <10664.1486133470@sss.pgh.pa.us> <1ae21f8f06434b03b1319cc62d35191b@BLRKECMBX37.ad.infosys.com> <9111.1486222321@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