pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Very frequent "Too many clients" eventually crashes postmaster
4+ messages / 3 participants
[nested] [flat]

* Very frequent "Too many clients" eventually crashes postmaster
@ 2020-05-03 14:28 Abraham, Danny <danny_abraham@bmc.com>
  2020-05-03 14:36 ` Re: Very frequent "Too many clients" eventually crashes postmaster Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-03 14:38 ` Re: Very frequent "Too many clients" eventually crashes postmaster Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 2 replies; 4+ messages in thread

From: Abraham, Danny @ 2020-05-03 14:28 UTC (permalink / raw)
  To: pgsql-general; +Cc: Abraham, Danny <danny_abraham@bmc.com>

Is there a way to eliminate postmaster crash/core ?

A surge in short-term connections eventually crashes PG on  "no free slots in PMChildFlags array".

Happens on AIX 7.2

=>grep "2020-05-02 08:16" * | grep clients | wc -l
       0
=>grep "2020-05-02 08:17" * | grep clients | wc -l
       0
=>grep "2020-05-02 08:18" * | grep clients | wc -l
     309
=>grep "2020-05-02 08:19" * | grep clients | wc -l
     603
=>grep "2020-05-02 08:20" * | grep clients | wc -l
     288
=>grep "2020-05-02 08:21" * | grep clients | wc -l
     230

2020-05-02 08:21:27.653 CDTFATAL:  no free slots in PMChildFlags array






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

* Re: Very frequent "Too many clients" eventually crashes postmaster
  2020-05-03 14:28 Very frequent "Too many clients" eventually crashes postmaster Abraham, Danny <danny_abraham@bmc.com>
@ 2020-05-03 14:36 ` Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-03 14:53   ` RE:  Re: Very frequent "Too many clients" eventually crashes postmaster Abraham, Danny <danny_abraham@bmc.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Tom Lane @ 2020-05-03 14:36 UTC (permalink / raw)
  To: Abraham, Danny <danny_abraham@bmc.com>; +Cc: pgsql-general

"Abraham, Danny" <danny_abraham@bmc.com> writes:
> Is there a way to eliminate postmaster crash/core ?
> A surge in short-term connections eventually crashes PG on  "no free slots in PMChildFlags array".

Update to a current release, maybe?  We fixed a bug with symptoms like
that last fall [1].

			regards, tom lane

[1] https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=3887e9455





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

* RE:  Re: Very frequent "Too many clients" eventually crashes postmaster
  2020-05-03 14:28 Very frequent "Too many clients" eventually crashes postmaster Abraham, Danny <danny_abraham@bmc.com>
  2020-05-03 14:36 ` Re: Very frequent "Too many clients" eventually crashes postmaster Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-05-03 14:53   ` Abraham, Danny <danny_abraham@bmc.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Abraham, Danny @ 2020-05-03 14:53 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general; Abraham, Danny <danny_abraham@bmc.com>

Will setting max_parallel_workers_per_gather  to 0 
(In fact, no parallel queries)
Solve this issue? 
I can sustain the slowness. 
We are on 11.5, and the fix is on 11.6.

-----Original Message-----
From: Tom Lane <tgl@sss.pgh.pa.us> 
Sent: Sunday, May 03, 2020 5:37 PM
To: Abraham, Danny <danny_abraham@bmc.com>
Cc: pgsql-general@postgresql.org
Subject: [EXTERNAL] Re: Very frequent "Too many clients" eventually crashes postmaster

"Abraham, Danny" <danny_abraham@bmc.com> writes:
> Is there a way to eliminate postmaster crash/core ?
> A surge in short-term connections eventually crashes PG on  "no free slots in PMChildFlags array".

Update to a current release, maybe?  We fixed a bug with symptoms like that last fall [1].

			regards, tom lane

[1] https://urldefense.proofpoint.com/v2/url?u=https-3A__git.postgresql.org_gitweb_-3Fp-3Dpostgresql.git...





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

* Re: Very frequent "Too many clients" eventually crashes postmaster
  2020-05-03 14:28 Very frequent "Too many clients" eventually crashes postmaster Abraham, Danny <danny_abraham@bmc.com>
@ 2020-05-03 14:38 ` Adrian Klaver <adrian.klaver@aklaver.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Adrian Klaver @ 2020-05-03 14:38 UTC (permalink / raw)
  To: Abraham, Danny <danny_abraham@bmc.com>; pgsql-general

On 5/3/20 7:28 AM, Abraham, Danny wrote:
> Is there a way to eliminate postmaster crash/core ?
> 
> A surge in short-term connections eventually crashes PG on  "no free slots in PMChildFlags array".
> 
> Happens on AIX 7.2
> 
> =>grep "2020-05-02 08:16" * | grep clients | wc -l
>         0
> =>grep "2020-05-02 08:17" * | grep clients | wc -l
>         0
> =>grep "2020-05-02 08:18" * | grep clients | wc -l
>       309
> =>grep "2020-05-02 08:19" * | grep clients | wc -l
>       603
> =>grep "2020-05-02 08:20" * | grep clients | wc -l
>       288
> =>grep "2020-05-02 08:21" * | grep clients | wc -l
>       230
> 
> 2020-05-02 08:21:27.653 CDTFATAL:  no free slots in PMChildFlags array
> 

Well:

backend/storage/ipc/pmsignal.c
/* Out of slots ... should never happen, else postmaster.c messed up */
         elog(FATAL, "no free slots in PMChildFlags array");
         return 0;                                       /* keep 
compiler quiet */


So:

1) What are your connection settings?

2) What is generating the client traffic?

3) Is there a pooler in front of the server?



-- 
Adrian Klaver
adrian.klaver@aklaver.com





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


end of thread, other threads:[~2020-05-03 14:53 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-05-03 14:28 Very frequent "Too many clients" eventually crashes postmaster Abraham, Danny <danny_abraham@bmc.com>
2020-05-03 14:36 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-05-03 14:53   ` Abraham, Danny <danny_abraham@bmc.com>
2020-05-03 14:38 ` Adrian Klaver <adrian.klaver@aklaver.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