Re: Postgres Out Of Memory Crash - Mailing list pgsql-general

From Laurenz Albe
Subject Re: Postgres Out Of Memory Crash
Date
Msg-id e089bb800a72c70fecd03b1d119c8d6fc567c717.camel@cybertec.at
Whole thread Raw
In response to Postgres Out Of Memory Crash  (Avi Weinberg <AviW@gilat.com>)
List pgsql-general
On Thu, 2023-11-02 at 09:12 +0000, Avi Weinberg wrote:
> I'm using Patroni Postgres installation and noticed that twice already postgres
> crashed due to out of memory.  I'm using logical replication with around 30-40
> active subscribers on this machine.  The machine has 128GB but only 32GB is allocated
> to Postgres.  How can I know what is actually causing the out of memory issue?
> Is it caused by not optimal postgres configuration or something else?

You should look into the PostgreSQL log.  That should show a message like

  LOG:  server process (PID 16024) was terminated by signal 9: Killed
  DETAIL:  Failed process was running: SELECT ...

It is not certain, but often that statement is the one that used up
all that memory.  At least it is a starting point for your investigation.

Yours,
Laurenz Albe



pgsql-general by date:

Previous
From: Paul Förster
Date:
Subject: Re: pg_checksums?
Next
From: "Kar, Swapnil (TR Technology)"
Date:
Subject: Postgres limitation in user management