pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #14708: Frequent connection timeout issue while connecting to Postgres database
2+ messages / 2 participants
[nested] [flat]

* BUG #14708: Frequent connection timeout issue while connecting to Postgres database
@ 2017-06-15 11:14  ruchitat@planittesting.com
  0 siblings, 1 reply; 2+ messages in thread

From: ruchitat@planittesting.com @ 2017-06-15 11:14 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      14708
Logged by:          Ruchita Terse
Email address:      ruchitat@planittesting.com
PostgreSQL version: 9.6.1
Operating system:   Windows 
Description:        

In our database setup we are often encounter wiht the connection timeout
issue while connecting with external application. Please find the detailed
information below.

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.

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.

PS: We are connecting with port 5432

Kindly help us to resolve this issue. 



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #14708: Frequent connection timeout issue while connecting to Postgres database
@ 2017-06-16 01:32  Michael Paquier <michael.paquier@gmail.com>
  parent: ruchitat@planittesting.com
  0 siblings, 0 replies; 2+ messages in thread

From: Michael Paquier @ 2017-06-16 01:32 UTC (permalink / raw)
  To: ruchitat@planittesting.com; +Cc: pgsql-bugs

On Thu, Jun 15, 2017 at 8:14 PM,  <ruchitat@planittesting.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

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Attachments:

auth-cancel-log.patch (text/x-patch, 543B) download diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 91ca8df2ea..6a587de288 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -2840,7 +2840,7 @@ ProcessInterrupts(void) if (ClientAuthInProgress) ereport(FATAL, (errcode(ERRCODE_QUERY_CANCELED), - errmsg("canceling authentication due to timeout"))); + errmsg("canceling authentication due to administrator command"))); else if (IsAutoVacuumWorkerProcess()) ereport(FATAL, (errcode(ERRCODE_ADMIN_SHUTDOWN),
^ permalink raw reply [nested|flat] 2+ messages in thread


end of thread, other threads:[~2017-06-16 01:32 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-06-15 11:14 BUG #14708: Frequent connection timeout issue while connecting to Postgres database ruchitat@planittesting.com
2017-06-16 01:32 ` Michael Paquier <michael.paquier@gmail.com>

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