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:
- idle_in_transaction_session_timeout = 300000 (5m)
- statement_timeout = 600000 (10m)
- 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.