public inbox for [email protected]  
help / color / mirror / Atom feed
From: Siraj G <[email protected]>
To: Pgsql-admin <[email protected]>
Subject: Out of Memory error triggering replica to transition into recovery mode
Date: Thu, 28 Nov 2024 08:34:57 -0500
Message-ID: <CAC5iy61uGHGfLpR2Wded8ZniyKqREeDBdeJ4ryXZ5jwU6-oKyg@mail.gmail.com> (raw)

Hello Experts!

As the subject says, today very frequently our replica DB is going into the
recovery mode causing an outage in the application side.

Here are the server  & details:
Server type: Compute engine
OS: Ubuntu 20
Pgsql: 12.2
CPUs: 64
Memory: 128GB
Shared_buffers: 32GB
Work_mem: 256MB
maintenance_work_mem = 3GB
shared_buffers = 32GB
max_connections = 4000
Total size of the DBs: 3TB

The application is designed in such a way that it consumes data
primarily from SECONDARY. And, there are several applications of such type.
I can see tons of messages in the postgres log being written as:
"IP, 2024-11-28 ,<db name>, <user>,1, FATAL: the database system is in
recovery mode"

This indicates that the app services are trying to connect to the DB
constantly and there are tons of them.

Any advice on how we can improvise the situation.

Regards
Siraj


view thread (2+ messages)  latest in thread

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Out of Memory error triggering replica to transition into recovery mode
  In-Reply-To: <CAC5iy61uGHGfLpR2Wded8ZniyKqREeDBdeJ4ryXZ5jwU6-oKyg@mail.gmail.com>

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

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox