Re: [BUGS] postgres client connection issue - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [BUGS] postgres client connection issue
Date
Msg-id 9111.1486222321@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUGS] postgres client connection issue  (Ranjeet Singh03 <Ranjeet_Singh03@infosys.com>)
Responses Re: [BUGS] postgres client connection issue
List pgsql-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

pgsql-bugs by date:

Previous
From: luc.gilot@limoog.net
Date:
Subject: [BUGS] BUG #14528: ODBC bug "cursor is open"
Next
From: Tom Lane
Date:
Subject: Re: [BUGS] postgres client connection issue