Out of Memory error triggering replica to transition into recovery mode

From: Siraj G <tosiraj(dot)g(at)gmail(dot)com>
To: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Out of Memory error triggering replica to transition into recovery mode
Date: 2024-11-28 13:34:57
Message-ID: CAC5iy61uGHGfLpR2Wded8ZniyKqREeDBdeJ4ryXZ5jwU6-oKyg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2024-11-28 16:31:22 Re: Out of Memory error triggering replica to transition into recovery mode
Previous Message SOzcn 2024-11-22 16:27:18 Re: DB Switch over and Switch back support