pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Avi Weinberg <AviW@gilat.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Postgres Out Of Memory Crash
Date: Thu, 02 Nov 2023 11:46:39 +0100
Message-ID: <e089bb800a72c70fecd03b1d119c8d6fc567c717.camel@cybertec.at> (raw)
In-Reply-To: <DB9PR07MB71808BC744552C349DA17E8DCBA6A@DB9PR07MB7180.eurprd07.prod.outlook.com>
References: <DB9PR07MB71808BC744552C349DA17E8DCBA6A@DB9PR07MB7180.eurprd07.prod.outlook.com>

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





view thread (3+ messages)  latest in thread

Message-ID: <e089bb800a72c70fecd03b1d119c8d6fc567c717.camel@cybertec.at>
Permalink:  ../e089bb800a72c70fecd03b1d119c8d6fc567c717.camel@cybertec.at/
Also on:    postgresql.org/message-id/e089bb800a72c70fecd03b1d119c8d6fc567c717.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, AviW@gilat.com
  Subject: Re: Postgres Out Of Memory Crash
  In-Reply-To: <e089bb800a72c70fecd03b1d119c8d6fc567c717.camel@cybertec.at>
  References: <DB9PR07MB71808BC744552C349DA17E8DCBA6A@DB9PR07MB7180.eurprd07.prod.outlook.com> <e089bb800a72c70fecd03b1d119c8d6fc567c717.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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