Memory continuously increases at a constant rate in Azure Database for PostgreSQL single server

Betty Li 0 Reputation points
2023-01-23T06:05:03.1366667+00:00

Our memory usage increases at a constant rate.

We noticed this issue a while ago and thought it was related to the number of active connections which were growing with the memory. We fixed the connection issue but obviously, memory is still a problem.

User's image

Doing releases seems to keep it down and it increases when there is no active work on the server. We tried doing a release to bring down the usage below but it had no effect. Scaling the pg server up and then down again is the only reliable fix.

We noticed the auto_vacuum keeps running as a background process.

User's image

Later on, we turned off the auto_vaccum and it decreases the increasing rate but overall the memory usage still increases

User's image

Two questions here:

  1. Is there a way to know which process is generating the higher and higher memory consumption?
  2. Any insights on what could cause the memory continuously increases at a constant rate even though there is no active work on the server? (as the memory increases no matter whether there is a query running or not)
Azure Database for PostgreSQL
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.