pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PostgreSQL Out of Memory
3+ messages / 3 participants
[nested] [flat]

* PostgreSQL Out of Memory
@ 2022-09-05 11:54  liam saffioti <liam.saffiotti@gmail.com>
  0 siblings, 2 replies; 3+ messages in thread

From: liam saffioti @ 2022-09-05 11:54 UTC (permalink / raw)
  To: pgsql-admin <pgsql-admin@lists.postgresql.org>

Hi Teams,

I have PG 14.5 on RHEL 8.4. I see many errors. Do you have any idea about
this problem?

TopMemoryContext: 1194808 total in 12 blocks; 3968 free (3 chunks); 1190840
used
  TopTransactionContext: 592728 total in 9 blocks; 30328 free (4 chunks);
562400 used
    ExecutorState: 551680 total in 8 blocks; 147192 free (31 chunks);
404488 used
      BTree array context: 4096 total in 3 blocks; 3488 free (9 chunks);
608 used
      TupleSort main: 3153976 total in 2 blocks; 6728 free (7 chunks);
3147248 used
        TupleSort sort: 8192 total in 1 blocks; 7928 free (0 chunks); 264
used
          Caller tuples: 16777216 total in 12 blocks; 624 free (13 chunks);
16776592 used
      ExprContext: 8192 total in 1 blocks; 7928 free (0 chunks); 264 used
      ExprContext: 8192 total in 1 blocks; 7928 free (0 chunks); 264 used
      MemoizeHashTable: 8192 total in 1 blocks; 7320 free (0 chunks); 872
used
      ExprContext: 8192 total in 1 blocks; 7928 free (0 chunks); 264 used
      ExprContext: 8192 total in 1 blocks; 7928 free (0 chunks); 264 used
....

FATAL:  terminating background worker "parallel worker" due to
administrator command
FATAL:  terminating background worker "parallel worker" due to
administrator command
FATAL:  terminating background worker "parallel worker" due to
administrator command
FATAL:  out of memory
FATAL:  out of memory
...

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

* Re: PostgreSQL Out of Memory
@ 2022-09-05 15:25  Mladen Gogala <gogala.mladen@gmail.com>
  parent: liam saffioti <liam.saffiotti@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Mladen Gogala @ 2022-09-05 15:25 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

On 9/5/22 07:54, liam saffioti wrote:
> Hi Teams,
>
> FATAL:  terminating background worker "parallel worker" due to 
> administrator command
> FATAL:  terminating background worker "parallel worker" due to 
> administrator command
> FATAL:  terminating background worker "parallel worker" due to 
> administrator command
> FATAL:  out of memory
> FATAL:  out of memory
> ...

You are allowing over-committing memory, which in turn activates OOMK 
(Out of Memory Killer) when the memory runs out. You have to restrict 
the number of connections or parameters like work_mem and 
hash_mem_multiplier. There is also a good article on Squishy Data:

https://www.crunchydata.com/blog/deep-postgresql-thoughts-the-linux-assassin

Basically, you should start with vm.overcommit_memory = 2

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com

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

* Re: PostgreSQL Out of Memory
@ 2022-09-07 00:41  Jeff Janes <jeff.janes@gmail.com>
  parent: liam saffioti <liam.saffiotti@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Jeff Janes @ 2022-09-07 00:41 UTC (permalink / raw)
  To: liam saffioti <liam.saffiotti@gmail.com>; +Cc: pgsql-admin <pgsql-admin@lists.postgresql.org>

On Mon, Sep 5, 2022 at 7:55 AM liam saffioti <liam.saffiotti@gmail.com>
wrote:

> Hi Teams,
>
> I have PG 14.5 on RHEL 8.4. I see many errors. Do you have any idea about
> this problem?
>
> TopMemoryContext: 1194808 total in 12 blocks; 3968 free (3 chunks);
> 1190840 used
>   TopTransactionContext: 592728 total in 9 blocks; 30328 free (4 chunks);
> 562400 used
>     ExecutorState: 551680 total in 8 blocks; 147192 free (31 chunks);
> 404488 used
>       BTree array context: 4096 total in 3 blocks; 3488 free (9 chunks);
> 608 used
>       TupleSort main: 3153976 total in 2 blocks; 6728 free (7 chunks);
> 3147248 used
>         TupleSort sort: 8192 total in 1 blocks; 7928 free (0 chunks); 264
> used
>           Caller tuples: 16777216 total in 12 blocks; 624 free (13
> chunks); 16776592 used
>

The problem context is probably hiding inside the ellipsis.

What is the single largest line (according to the first numeric field) from
this report?

Cheers,

Jeff

>

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


end of thread, other threads:[~2022-09-07 00:41 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-09-05 11:54 PostgreSQL Out of Memory liam saffioti <liam.saffiotti@gmail.com>
2022-09-05 15:25 ` Mladen Gogala <gogala.mladen@gmail.com>
2022-09-07 00:41 ` Jeff Janes <jeff.janes@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