0

Postgres is running on Azure as PAAS. It is running with 1 core 5 GB memory. We have a lot of row updates happening in the database.

Its memory usage increases gradually as if there is a memory leak and then it reaches 100%.

What I tried so far:

  1. idle_in_transaction_session_timeout = 300000 (5m)
  2. statement_timeout = 600000 (10m)
  3. VACUUM FULL (to free up dead tupples in database)

Memory Configuration:

 db=> SHOW shared_buffers;
 shared_buffers
----------------
 512MB
(1 row)

db=> SHOW wal_buffers;
 wal_buffers
-------------
 2097144kB
(1 row)

db=> show effective_cache_size;
 effective_cache_size
----------------------
 1536MB
(1 row)

db=> SHOW work_mem;
 work_mem
----------
 4MB
(1 row)

db=> show maintenance_work_mem;
 maintenance_work_mem
----------------------
 64MB
(1 row)

db=> SHOW synchronous_commit;
 synchronous_commit
--------------------
 off
(1 row)

db=> show checkpoint_timeout;
 checkpoint_timeout
--------------------
 5min
(1 row)

db=> SHOW checkpoint_completion_target;
 checkpoint_completion_target
------------------------------
 0.5
(1 row)

But nothing worked, i am very puzzled.

Cpp crusaders
  • 117
  • 2
  • 10
  • 1
    Why shouldn't it use all the memory? Isn't that what it is there for? What specific measure of memory are you monitoring? – jjanes Sep 19 '21 at 22:44
  • I monitored memory at: "Metrics -> Memory Percent" I thought the memory & cpu should be at max about 80%, to buffer for spikes in customer requests which will need even more resources of cpu & memory. – Cpp crusaders Sep 20 '21 at 04:25

0 Answers0