public inbox for [email protected]  
help / color / mirror / Atom feed
From: Rory Campbell-Lange <[email protected]>
To: Stefan Knecht <[email protected]>
Cc: Daniele Varrazzo <[email protected]>
Cc: [email protected]
Subject: Re: psycopg3: a first report
Date: Mon, 30 Mar 2020 11:00:21 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAP50yQ9WSB6s_rfXe2S0V-8H8ByCRNSw6ninrGdn5NgLzWZ8bA@mail.gmail.com>
References: <CA+mi_8ZH-feQP0+k_j7_joygE=hMZCFnaNMv8Z1KCLKB9YLb0w@mail.gmail.com>
	<CAP50yQ_Mt=RtR0sXYoazJTuarphR1Kv8A6YTevCMiv+xZeD9=Q@mail.gmail.com>
	<[email protected]>
	<CAP50yQ9WSB6s_rfXe2S0V-8H8ByCRNSw6ninrGdn5NgLzWZ8bA@mail.gmail.com>

On 30/03/20, Stefan Knecht ([email protected]) wrote:
> Rory, this is about established connections, not new connections - psycopg2
> already offers a connection timeout, but that is a different thing. I don't
> want to drift too far off topic - but we are already using pgbouncer, and
> the problem isn't detected by it, either. I'm not a developer but I believe
> the problem is the generic nature of some blocking socket calls, which may
> hang under some odd circumstances, and they remain hanging until some odd
> ssl timeout is reached (15 minutes+ which is a very long time for any
> application to be hanging in limbo, but more so for our own monitoring
> tools which are written in Python).

My apologies for the misunderstanding.

This sounds like the hanging tcp/ip problem one can get with
disappearing web server clients. We've had that problem with mobiles
dropping out presumably because they go out of range, and the provider
not dropping the connection because they might come back.

We deal with this in apache by having a fairly aggressive
KeepAliveTimeout parameter.

Having this problem in one's own stack sounds scary.

I'm very intrigued by Daniele's suggestion that having a per-operation
timeout on the client is achievable.

Rory







view thread (8+ messages)  latest in thread

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: psycopg3: a first report
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox