Re: BUG #14708: Frequent connection timeout issue while connecting to Postgres database

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: ruchitat(at)planittesting(dot)com
Cc: PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14708: Frequent connection timeout issue while connecting to Postgres database
Date: 2017-06-16 01:32:22
Message-ID: CAB7nPqQCw8pk1ZovZC59X1awt9p6BDDqPqGEew0BzHHcsFL=1w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Jun 15, 2017 at 8:14 PM, <ruchitat(at)planittesting(dot)com> wrote:
> While server trying to connect Postgres database we are getting following
> error message :
> 1. FATAL: cancelling authentication due to timeout.
> 2. FATAL : two many clients already.

Those are not error strings present in the source code. Those two are though:
"canceling authentication due to timeout"
"sorry, too many clients already"

> Even the number of actual connected clients is very minimum. The
> maximum limit set for connection of clients is 200 and also currently
> utilized connections are not more than 50 i.e not exceeding default
> connection limit.

Are you sure that there are not connection attempt spikes?
log_connections = on would help in checking incoming connection
attempts.

> Kindly help us to resolve this issue.

I am not seeing any direct bugs here but...

The "due to timeout" message comes from ProcessInterrupts(), which
refers to the fact that the process is being shut down. So shouldn't
this message be changed? The current message looks confusing to me.
Please see the attached.
--
Michael

Attachment Content-Type Size
auth-cancel-log.patch text/x-patch 543 bytes

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2017-06-16 01:54:25 Re: BUG #14706: Dependencies not recorded properly for base types
Previous Message Amit Langote 2017-06-16 00:32:41 Re: GIN index vacuum hang after pg_rman restore in PG9.2.21