Re: psycopg3: a first report

From: Stefan Knecht <knecht(dot)stefan(at)gmail(dot)com>
To: Rory Campbell-Lange <rory(at)campbell-lange(dot)net>
Cc: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>, psycopg(at)postgresql(dot)org
Subject: Re: psycopg3: a first report
Date: 2020-03-30 09:14:59
Message-ID: CAP50yQ9WSB6s_rfXe2S0V-8H8ByCRNSw6ninrGdn5NgLzWZ8bA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

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).

Having the client provide general handling for in-flight timeouts would be
the overall best solution imho.

On Mon, Mar 30, 2020 at 2:48 PM Rory Campbell-Lange <rory(at)campbell-lange(dot)net>
wrote:

> On 30/03/20, Stefan Knecht (knecht(dot)stefan(at)gmail(dot)com) wrote:
> > If I may, one thing that has been a constant troublemaker for us -
> running
> > primarily on AWS - is timeouts.
>
> If the issue is disappearing hosts or general connectivity problems,
> isn't that problem best dealt with by pg_bouncer?
>
> https://www.pgbouncer.org/config.html#connection-sanity-checks-timeouts
>
> Specifically you may wish to refer to server_connect_timeout.
>
> Rory
>
>

--
//
zztat - The Next-Gen Oracle Performance Monitoring and Reaction Framework!
Visit us at zztat.net | @zztat_oracle | fb.me/zztat | zztat.net/blog/

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message Daniele Varrazzo 2020-03-30 09:17:53 Re: psycopg3: a first report
Previous Message Rory Campbell-Lange 2020-03-30 07:49:17 Re: psycopg3: a first report