My Postgres RDS Database is constantly reastarting suddenly due to heavyconsumption of memory. Not sure why it is happening suddenly.
please help . some times freeable memory goes up to 30gb and suddenly comes to 8gb. not sure why.
Below are logs
The database process was killed by the OS due to excessive memory consumption. It is recommended to tune your database workload and/or parameter usage to reduce memory consumption.
2022-03-07 12:17:57.302 GMT [9230] LOG: skipping missing configuration file "/rdsdbdata/config/recovery.conf"
2022-03-07 12:17:57.302 GMT [9230] LOG: skipping missing configuration file "/rdsdbdata/config/recovery.conf"
2022-03-07 12:17:57.302 GMT [9230] LOG: skipping missing configuration file "/rdsdbdata/db/postgresql.auto.conf"
2022-03-07 12:17:57 UTC::@:[9230]:WARNING: unrecognized configuration parameter "rds.adaptive_autovacuum"
2022-03-07 12:17:57 UTC::@:[9230]:WARNING: unrecognized configuration parameter "rds.enable_plan_management"
2022-03-07 12:17:57 UTC::@:[9230]:LOG: database system is shut down
Postgres Shared Memory Value: 23067312128 bytes
2022-03-07 12:17:59.685 GMT [9858] LOG: skipping missing configuration file "/rdsdbdata/config/recovery.conf"
2022-03-07 12:17:59.686 GMT [9858] LOG: skipping missing configuration file "/rdsdbdata/config/recovery.conf"
2022-03-07 12:17:59.686 GMT [9858] LOG: skipping missing configuration file "/rdsdbdata/db/postgresql.auto.conf"
2022-03-07 12:17:59 UTC::@:[9858]:WARNING: unrecognized configuration parameter "rds.adaptive_autovacuum"
2022-03-07 12:17:59 UTC::@:[9858]:WARNING: unrecognized configuration parameter "rds.enable_plan_management"
2022-03-07 12:17:59 UTC::@:[9858]:LOG: starting PostgreSQL 12.4 on aarch64-unknown-linux-gnu, compiled by aarch64-unknown-linux-gnu-gcc (GCC) 7.4.0, 64-bit
2022-03-07 12:17:59 UTC::@:[9858]:LOG: listening on IPv4 address "0.0.0.0", port 5434
2022-03-07 12:17:59 UTC::@:[9858]:LOG: listening on IPv6 address "::", port 5434
2022-03-07 12:17:59 UTC::@:[9858]:LOG: listening on Unix socket "/tmp/.s.PGSQL.5434"
2022-03-07 12:17:59 UTC::@:[9858]:LOG: could not write file "pg_stat_tmp/pgss_query_texts.stat": No such file or directory
2022-03-07 12:17:59 UTC::@:[9858]:LOG: redirecting log output to logging collector process
2022-03-07 12:17:59 UTC::@:[9858]:HINT: Future log output will appear in directory "/rdsdbdata/log/error".
2022-03-07 12:20:10 UTC::@:[9859]:LOG: skipping missing configuration file "/rdsdbdata/config/recovery.conf"
2022-03-07 12:20:10 UTC::@:[9859]:LOG: skipping missing configuration file "/rdsdbdata/db/postgresql.auto.conf"
2022-03-07 12:20:30 UTC::@:[9859]:LOG: skipping missing configuration file "/rdsdbdata/config/recovery.conf"
2022-03-07 12:20:30 UTC::@:[9859]:LOG: skipping missing configuration file "/rdsdbdata/db/postgresql.auto.conf"
2022-03-07 12:26:50 UTC::@:[9859]:LOG: skipping missing configuration file "/rdsdbdata/config/recovery.conf"
2022-03-07 12:26:50 UTC::@:[9859]:LOG: skipping missing configuration file "/rdsdbdata/db/postgresql.auto.conf"
2022-03-07 13:43:53.670 GMT [22533] LOG: skipping missing configuration file "/rdsdbdata/config/recovery.conf"
2022-03-07 13:43:53.670 GMT [22533] LOG: skipping missing configuration file "/rdsdbdata/config/recovery.conf"
2022-03-07 13:43:53.670 GMT [22533] LOG: skipping missing configuration file "/rdsdbdata/db/postgresql.auto.conf"
2022-03-07 13:43:53 UTC::@:[22533]:WARNING: unrecognized configuration parameter "rds.adaptive_autovacuum"
2022-03-07 13:43:53 UTC::@:[22533]:WARNING: unrecognized configuration parameter "rds.enable_plan_management"
2022-03-07 13:43:53 UTC::@:[22533]:LOG: database system is shut down
Postgres Shared Memory Value: 23067312128 bytes
2022-03-07 13:43:54.922 GMT [22660] LOG: skipping missing configuration file "/rdsdbdata/config/recovery.conf"
2022-03-07 13:43:54.922 GMT [22660] LOG: skipping missing configuration file "/rdsdbdata/config/recovery.conf"
2022-03-07 13:43:54.922 GMT [22660] LOG: skipping missing configuration file "/rdsdbdata/db/postgresql.auto.conf"
2022-03-07 13:43:54 UTC::@:[22660]:WARNING: unrecognized configuration parameter "rds.adaptive_autovacuum"
2022-03-07 13:43:54 UTC::@:[22660]:WARNING: unrecognized configuration parameter "rds.enable_plan_management"
2022-03-07 13:43:54 UTC::@:[22660]:LOG: starting PostgreSQL 12.4 on aarch64-unknown-linux-gnu, compiled by aarch64-unknown-linux-gnu-gcc (GCC) 7.4.0, 64-bit
2022-03-07 13:43:54 UTC::@:[22660]:LOG: listening on IPv4 address "0.0.0.0", port 5434
2022-03-07 13:43:54 UTC::@:[22660]:LOG: listening on IPv6 address "::", port 5434
2022-03-07 13:43:54 UTC::@:[22660]:LOG: listening on Unix socket "/tmp/.s.PGSQL.5434"
2022-03-07 13:43:55 UTC::@:[22660]:LOG: redirecting log output to logging collector process
2022-03-07 13:43:55 UTC::@:[22660]:HINT: Future log output will appear in directory "/rdsdbdata/log/error".
2022-03-07 13:45:11 UTC::@:[22732]:LOG: skipping missing configuration file "/rdsdbdata/config/recovery.conf"
2022-03-07 13:45:11 UTC::@:[22732]:LOG: skipping missing configuration file "/rdsdbdata/db/postgresql.auto.conf"
2022-03-07 13:45:30 UTC::@:[22732]:LOG: skipping missing configuration file "/rdsdbdata/config/recovery.conf"
2022-03-07 13:45:30 UTC::@:[22732]:LOG: skipping missing configuration file "/rdsdbdata/db/postgresql.auto.conf"
2022-03-07 13:49:25.588 GMT [8568] LOG: skipping missing configuration file "/rdsdbdata/config/recovery.conf"
2022-03-07 13:49:25.588 GMT [8568] LOG: skipping missing configuration file "/rdsdbdata/config/recovery.conf"
2022-03-07 13:49:25.590 GMT [8568] LOG: skipping missing configuration file "/rdsdbdata/db/postgresql.auto.conf"
2022-03-07 13:49:25 UTC::@:[8568]:WARNING: unrecognized configuration parameter "rds.adaptive_autovacuum"
2022-03-07 13:49:25 UTC::@:[8568]:WARNING: unrecognized configuration parameter "rds.enable_plan_management"
2022-03-07 13:49:25 UTC::@:[8568]:LOG: database system is shut down
Postgres Shared Memory Value: 23067312128 bytes
2022-03-07 13:49:26.803 GMT [8674] LOG: skipping missing configuration file "/rdsdbdata/config/recovery.conf"
2022-03-07 13:49:26.803 GMT [8674] LOG: skipping missing configuration file "/rdsdbdata/config/recovery.conf"
2022-03-07 13:49:26.803 GMT [8674] LOG: skipping missing configuration file "/rdsdbdata/db/postgresql.auto.conf"
2022-03-07 13:49:26 UTC::@:[8674]:WARNING: unrecognized configuration parameter "rds.adaptive_autovacuum"
2022-03-07 13:49:26 UTC::@:[8674]:WARNING: unrecognized configuration parameter "rds.enable_plan_management"
2022-03-07 13:49:26 UTC::@:[8674]:LOG: starting PostgreSQL 12.4 on aarch64-unknown-linux-gnu, compiled by aarch64-unknown-linux-gnu-gcc (GCC) 7.4.0, 64-bit
2022-03-07 13:49:26 UTC::@:[8674]:LOG: listening on IPv4 address "0.0.0.0", port 5434
2022-03-07 13:49:26 UTC::@:[8674]:LOG: listening on IPv6 address "::", port 5434
2022-03-07 13:49:26 UTC::@:[8674]:LOG: listening on Unix socket "/tmp/.s.PGSQL.5434"
2022-03-07 13:49:26 UTC::@:[8674]:LOG: redirecting log output to logging collector process
2022-03-07 13:49:26 UTC::@:[8674]:HINT: Future log output will appear in directory "/rdsdbdata/log/error".
----------------------- END OF LOG ----------------------