Re: Connections Increasing Slowly

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Bee(dot)Lists" <bee(dot)lists(at)gmail(dot)com>
Cc: Submit Postgresql Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Connections Increasing Slowly
Date: 2020-06-23 02:07:25
Message-ID: 2114531.1592878045@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Bee.Lists" <bee(dot)lists(at)gmail(dot)com> writes:
> On Jun 22, 2020, at 4:11 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Bee.Lists 2020-06-23 02:32:56 Re: Connections Increasing Slowly
Previous Message Bee.Lists 2020-06-23 01:57:44 Re: Connections Increasing Slowly