Re: Connections Increasing Slowly - Mailing list pgsql-novice

From Tom Lane
Subject Re: Connections Increasing Slowly
Date
Msg-id 2114531.1592878045@sss.pgh.pa.us
Whole thread Raw
In response to Re: Connections Increasing Slowly  ("Bee.Lists" <bee.lists@gmail.com>)
Responses Re: Connections Increasing Slowly  ("Bee.Lists" <bee.lists@gmail.com>)
Re: Connections Increasing Slowly  ("Bee.Lists" <bee.lists@gmail.com>)
List pgsql-novice
"Bee.Lists" <bee.lists@gmail.com> writes:
> On Jun 22, 2020, at 4:11 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Another idea, if you suspect that the idle connections are caused
>> by firewall timeouts or the like, is to enable more aggressive
>> TCP keepalive checking, to ensure the server notices if a client
>> isn't there at all anymore.  See the tcp_keepalives_* settings.

> Who owns the actual connections?  The server allows them, the client
> requests them.  The error I am getting is that the gem I’m using uses a
> connection that’s dropped.

Hmm.  If the client thinks the server dropped the connection, but the
server thinks the connection is still live, that smells strongly of
network-level disconnects.  Does the client let the connection sit idle
for more than a minute or two at a time?  If so I'd bet that some firewall
in between is deciding that the connection is dead and dropping it.
Again, setting the server's tcp_keepalives_* settings could help fix that,
by ensuring that the network connection sees some traffic regularly.

            regards, tom lane



pgsql-novice by date:

Previous
From: "Bee.Lists"
Date:
Subject: Re: Connections Increasing Slowly
Next
From: "Bee.Lists"
Date:
Subject: Re: Connections Increasing Slowly