From: Tom Lane <tgl@sss.pgh.pa.us>
To: nunziotocci2000@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14432: sslmode=allow causing authentication to time out
Date: Thu, 24 Nov 2016 15:52:25 -0500
Message-ID: <23234.1480020745@sss.pgh.pa.us> (raw)
In-Reply-To: <20161124175530.6530.75672@wrigleys.postgresql.org>
References: <20161124175530.6530.75672@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
nunziotocci2000@gmail.com writes:
> I send 100 login requests to PostgreSQL, and 2-3 of them come back 2 minutes
> later saying "server closed the connection unexpectedly", and the server
> logs say "canceling authentication due to timeout".
FWIW, I couldn't reproduce this (using RHEL6, don't have a Fedora
installation at the moment).
> I tracked it down to sslmode=allow. The below script reproduces the
> problem.
Since you haven't done anything to enable SSL in your test server,
sslmode=allow shouldn't have any effect except to allow libpq to
retry a failed connection attempt one time. libpq is pretty
simple-minded about that and will retry no matter what the specific
error report is, in particular it would do so for "too many clients".
So basically this ought to just increase the number of "too many clients"
failures you get. I wonder whether you are running into kernel
resource limits like number of processes or number of open files.
I was able to get some "fork failed: Resource temporarily unavailable"
type errors if I pushed max_connections high enough, but no unexpected
behavior.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, nunziotocci2000@gmail.com
Subject: Re: BUG #14432: sslmode=allow causing authentication to time out
In-Reply-To: <23234.1480020745@sss.pgh.pa.us>
References: <20161124175530.6530.75672@wrigleys.postgresql.org> <23234.1480020745@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox