pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Wheeler <dwheeler@dgitsystems.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Cc: Orapan Sanghirunyaplute <orapans@dgitsystems.com>
Cc: Ross Dougherty <rdougherty@dgitsystems.com>
Subject: Re: Connection terminated but client didn't realise
Date: Mon, 02 Dec 2019 10:17:04 -0500
Message-ID: <30006.1575299824@sss.pgh.pa.us> (raw)
In-Reply-To: <124613C2-A989-48C5-9EC6-A11B5B490748@dgitsystems.com>
References: <124613C2-A989-48C5-9EC6-A11B5B490748@dgitsystems.com>

David Wheeler <dwheeler@dgitsystems.com> writes:
> We have a query that our system runs nightly to refresh materialised views. This takes some time to execute (~25 minutes) and then it will usually return the results to the application and everything is golden. However occasionally we see something like the below, where the query finishes, but the connection gets unexpectedly closed from Postgres’ perspective. From the application’s perspective the connection is still alive, and it sits there forever waiting for the result.

Is the application remote from the database server?  My gut reaction
to this type of report is "something timed out the network connection",
but there would have to be a router or firewall or the like in between
to make that a tenable explanation.

If that is the issue, you should be able to fix it by making the
server's TCP keepalive settings more aggressive.

			regards, tom lane





view thread (3+ messages)  latest in thread

Message-ID: <30006.1575299824@sss.pgh.pa.us>
Permalink:  ../30006.1575299824@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/30006.1575299824@sss.pgh.pa.us

 · 

reply

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-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dwheeler@dgitsystems.com, orapans@dgitsystems.com, rdougherty@dgitsystems.com
  Subject: Re: Connection terminated but client didn't realise
  In-Reply-To: <30006.1575299824@sss.pgh.pa.us>
  References: <124613C2-A989-48C5-9EC6-A11B5B490748@dgitsystems.com> <30006.1575299824@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