Re: Connections Increasing Slowly

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "Bee(dot)Lists" <bee(dot)lists(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Submit Postgresql Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Connections Increasing Slowly
Date: 2020-06-23 17:40:54
Message-ID: CAKFQuwaVqXLMxkyZPEJ8kRfNRjNLGWNTYBve=dP1PFbBPCUUDA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Mon, Jun 22, 2020 at 6:57 PM Bee.Lists <bee(dot)lists(at)gmail(dot)com> wrote:

> > On Jun 22, 2020, at 4:11 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >
> > Postgres doesn't really think that killing connections is part of its
> > charter. (There is idle_in_transaction_session_timeout, but that's
> > there to guard against a specific performance issue, not to kill
> > non-misbehaving sessions.)
>
> Who owns the actual connections? [...] and now you’re saying connections
> aren’t assumed by the database.
>

Huh? What do you mean by "owns"? What does "connection's aren't assumed"
mean? All Tom said is that PostgreSQL doesn't prevent a user from opening
a connection and keeping it open indefinitely - at least so long as it
isn't in a transaction.

Frankly, if you cannot explain how your client application is behaving you
should overcome that knowledge gap first. You can probably infer some of
that behavior from observing the server but a better approach is to read
the documentation and/or code for the client library to see how it behaves
- and then confirm that behavior by observing the server.

All that said there is a good chance Tom is right and there are network
level issues going on here and that is a bit out of my league. I would
suggest trying to create some kind of reproducible error via a standalone
script and debug from that instead of observing a production server. Then
you can run the script on a local-only setup to more confidently rule out
application fault and rule in network fault.

David J.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Anthony E. Greene 2020-06-23 22:52:31 Re: manual for syntax for pg Query Tool
Previous Message David G. Johnston 2020-06-23 17:31:30 Re: Connections Increasing Slowly